TT#26264 Cleanup heartbeat service support

Move init script into /usr/share/heartbeat so that it is not easily
accessible as a proper sysvinit script. It did not use lsb/init-functions
and as such was not redirecting to the systemd service, making the script
dangerous to have laying around as it could mess up with our systemd
support.

Change-Id: Ia317b719cf23933523cb3f945d701015384e39cc
changes/20/20220/4
Guillem Jover 8 years ago
parent 3b2996434a
commit 5bfc2de1a5

@ -3,7 +3,6 @@ etc/ha.d/conf
etc/ha.d/cts
etc/ha.d/rc.d
etc/ha.d/resource.d
etc/init.d
etc/logrotate.d/
usr/include/pils
usr/lib64/heartbeat
@ -16,6 +15,7 @@ usr/lib64/pils/plugins
usr/lib64/pils/plugins/InterfaceMgr
usr/lib64/stonith/
usr/lib64/stonith/plugins/
usr/share/heartbeat/
var/lib/heartbeat
var/lib/heartbeat/api
var/lib/heartbeat/casual

@ -31,7 +31,6 @@
/etc/ha.d/resource.d/portblock
/etc/ha.d/shellfuncs
/etc/heartbeat
/etc/init.d/heartbeat
/etc/logrotate.d/heartbeat
/etc/pam.d/hbmgmtd
usr/bin/cl_respawn
@ -344,6 +343,7 @@ usr/share/heartbeat/lrmtest/testcases/xmllint.sh
usr/share/heartbeat/mach_down
usr/share/heartbeat/req_resource
usr/share/heartbeat/stonithdtest/STONITHDBasicSanityCheck
usr/share/heartbeat/sysvinit
usr/share/heartbeat/utillib.sh
usr/share/man/man1/cl_status.1.gz
usr/share/man/man1/ha_logger.1.gz

@ -15,9 +15,9 @@ GuessMainPID=no
RemainAfterExit=no
PIDFile=/var/run/heartbeat.pid
SuccessExitStatus=5 6
ExecStart=/etc/init.d/heartbeat start
ExecStop=/etc/init.d/heartbeat stop
ExecReload=/etc/init.d/heartbeat reload
ExecStart=/usr/share/heartbeat/sysvinit start
ExecStop=/usr/share/heartbeat/sysvinit stop
ExecReload=/usr/share/heartbeat/sysvinit reload
[Install]
WantedBy=multi-user.target

@ -0,0 +1 @@
rm_conffile /etc/init.d/heartbeat 2.1.3-7~sipwise4+1~mr6.3.0.0

@ -55,20 +55,6 @@ case "$1" in
chown $i /var/lib/heartbeat/cores/$i
chgrp root /var/lib/heartbeat/cores/$i
done
# Do we want to move the old S20 symlinks to S75 ones?
if [ -n "$2" ] ; then
if `dpkg --compare-versions "$2" lt 1.0.4-2`; then
# use debconf
. /usr/share/debconf/confmodule
db_get heartbeat/change_init || RET="false"
if [ "$RET" = "true" ]; then
update-rc.d -f heartbeat remove > /dev/null
fi
db_stop
fi
fi
update-rc.d heartbeat defaults >/dev/null || true
ldconfig

@ -6,9 +6,10 @@
#
# see: dh_installdeb(1)
if [ -x /etc/init.d/heartbeat ]; then
invoke-rc.d heartbeat stop
fi
# Cleanup old installed init script links, before we remove it.
update-rc.d -f heartbeat remove >/dev/null
invoke-rc.d heartbeat stop
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

2
debian/rules vendored

@ -73,7 +73,7 @@ install-stamp: build
$(DTMP)/usr/share/doc/heartbeat/README.cts
find $(DTMP)/usr/share/man -type f | xargs gzip -v --best
install -c -m 755 heartbeat/init.d/heartbeat \
$(DTMP)/etc/init.d/heartbeat
$(DTMP)/usr/share/heartbeat/sysvinit
-mkdir -p $(DTMP)/usr/share/doc/ldirectord/
install -c -m 644 ldirectord/ldirectord.cf \
$(DTMP)/usr/share/doc/ldirectord/

Loading…
Cancel
Save