Merge "Move the mtce /etc/mtc/tmp/.node_locked flag file out of /etc"
This commit is contained in:
commit
28ca6049a4
@ -106,7 +106,7 @@ void daemon_exit ( void );
|
||||
#define CONFIG_PASS_FILE ((const char *)"/var/run/.config_pass")
|
||||
#define CONFIG_FAIL_FILE ((const char *)"/var/run/.config_fail")
|
||||
#define NODE_LOCKED_FILE ((const char *)"/var/run/.node_locked")
|
||||
#define NODE_LOCKED_FILE_BACKUP ((const char *)"/etc/mtc/tmp/.node_locked")
|
||||
#define NODE_LOCKED_FILE_BACKUP ((const char *)"/var/persist/mtc/.node_locked")
|
||||
#define NODE_RESET_FILE ((const char *)"/var/run/.node_reset")
|
||||
#define SMGMT_DEGRADED_FILE ((const char *)"/var/run/.sm_degraded")
|
||||
#define SMGMT_UNHEALTHY_FILE ((const char *)"/var/run/.sm_node_unhealthy")
|
||||
|
@ -23,6 +23,7 @@ etc/services.d/storage/mtcTest
|
||||
etc/services.d/worker/mtcTest
|
||||
etc/syslog-ng/conf.d/mtce.conf
|
||||
etc/systemd/system-preset/
|
||||
usr/lib/tmpfiles.d/mtc.conf
|
||||
usr/lib/ocf/resource.d/platform/mtcAgent
|
||||
usr/local/bin/fsmond
|
||||
usr/local/bin/hbsAgent
|
||||
|
@ -7,17 +7,24 @@ case "$1" in
|
||||
configure)
|
||||
# Replace the default hwclock.sh with our copy
|
||||
if [ -e /etc/init.d/hwclock.sh ]; then
|
||||
if [ -e /etc/init.d/hwclock.sh.dpkg-bak ]; then
|
||||
rm -f /etc/init.d/hwclock.sh.dpkg-bak
|
||||
fi
|
||||
mv -f /etc/init.d/hwclock.sh /etc/init.d/hwclock.sh.dpkg-bak
|
||||
fi
|
||||
cp -a /usr/share/mtce/hwclock.sh /etc/init.d/hwclock.sh
|
||||
|
||||
# Replace the default hwclock.service with our copy
|
||||
if [ -e /lib/systemd/system/hwclock.service ]; then
|
||||
if [ -e /lib/systemd/system/hwclock.service.bak ]; then
|
||||
rm -f /lib/systemd/system/hwclock.service.bak
|
||||
fi
|
||||
mv -f /lib/systemd/system/hwclock.service /lib/systemd/system/hwclock.service.bak
|
||||
fi
|
||||
cp -a /usr/share/mtce/hwclock.service /lib/systemd/system/hwclock.service
|
||||
;;
|
||||
*)
|
||||
echo "mtce postinst called with an unknown argument \`$1'" >&2
|
||||
echo "mtce postinst called with an unsupported argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
@ -17,7 +17,8 @@ export COLLECTDIR = $(SYSCONFDIR)/collect.d
|
||||
export INITDIR =$(SYSCONFDIR)/init.d
|
||||
export LOGDIR = $(SYSCONFDIR)/logrotate.d
|
||||
export SERVICESDIR = $(SYSCONFDIR)/services.d
|
||||
|
||||
export TMPFILESDIR = $(ROOT)/usr/lib/tmpfiles.d
|
||||
export PERSISTDIR = $(ROOT)/var/persist
|
||||
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||
export MAJOR = $(shell echo $(DEB_VERSION) | cut -d. -f1)
|
||||
export MINOR = $(shell echo $(shell echo $(DEB_VERSION) | cut -d. -f2) | cut -d- -f1)
|
||||
@ -28,8 +29,8 @@ export MINOR = $(shell echo $(shell echo $(DEB_VERSION) | cut -d. -f2) | cut -d-
|
||||
override_dh_auto_install:
|
||||
# Resource agent files
|
||||
install -m 755 -d $(SYSCONFDIR)
|
||||
install -m 755 -d $(SYSCONFDIR)/mtc
|
||||
install -m 755 -d $(SYSCONFDIR)/mtc/tmp
|
||||
install -m 755 -d $(PERSISTDIR)/mtc
|
||||
install -m 755 -d $(OCFPLATFORMDIR)
|
||||
install -m 755 -p -D scripts/mtcAgent $(OCFPLATFORMDIR)/mtcAgent
|
||||
install -m 755 -p -D hwmon/scripts/ocf/hwmon $(OCFPLATFORMDIR)/hwmon
|
||||
@ -43,7 +44,7 @@ override_dh_auto_install:
|
||||
install -m 600 -p -D pmon/scripts/pmond.conf $(SYSCONFDIR)/mtc/pmond.conf
|
||||
install -m 600 -p -D lmon/scripts/lmond.conf $(SYSCONFDIR)/mtc/lmond.conf
|
||||
install -m 600 -p -D hostw/scripts/hostwd.conf $(SYSCONFDIR)/mtc/hostwd.conf
|
||||
|
||||
install -m 600 -p -D scripts/tmpfiles.conf $(TMPFILESDIR)/mtc.conf
|
||||
install -m 755 -d $(BMCCONFDIR)
|
||||
install -m 644 -p -D scripts/sensor_hp360_v1_ilo_v4.profile $(BMCCONFDIR)/sensor_hp360_v1_ilo_v4.profile
|
||||
install -m 644 -p -D scripts/sensor_hp380_v1_ilo_v4.profile $(BMCCONFDIR)/sensor_hp380_v1_ilo_v4.profile
|
||||
|
@ -1439,6 +1439,17 @@ void daemon_service_run ( void )
|
||||
}
|
||||
}
|
||||
|
||||
/* Cleanup the old obsoleted persistent node locked file */
|
||||
#define OBSOLETED_NODE_LOCKED_FILE_BACKUP ((const char *)"/etc/mtc/tmp/.node_locked")
|
||||
if ( strcmp (NODE_LOCKED_FILE_BACKUP, OBSOLETED_NODE_LOCKED_FILE_BACKUP ) )
|
||||
{
|
||||
if ( daemon_is_file_present ( OBSOLETED_NODE_LOCKED_FILE_BACKUP ) )
|
||||
{
|
||||
ilog ("removing obsoleted %s file", OBSOLETED_NODE_LOCKED_FILE_BACKUP );
|
||||
daemon_remove_file ( OBSOLETED_NODE_LOCKED_FILE_BACKUP );
|
||||
}
|
||||
}
|
||||
|
||||
/* If the mtcClient starts up and finds that its persistent node
|
||||
* locked backup file is present then make sure the volatile one
|
||||
* is also present. */
|
||||
|
4
mtce/src/scripts/tmpfiles.conf
Normal file
4
mtce/src/scripts/tmpfiles.conf
Normal file
@ -0,0 +1,4 @@
|
||||
d /var/persist/mtc 755 root root
|
||||
|
||||
# For stx.11 only:
|
||||
r /etc/mtc/tmp/.node_locked
|
Loading…
x
Reference in New Issue
Block a user