mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Remove 4 from default runlevel in xen-watchdog, xend and xendomains. Similar to what changeset 24847:0900b1c905f1 does in xencommons, remove runlevel 4 from the other runlevel scripts. LSB defines runlevel 4 as reserved for local use, the local sysadmin is responsible for symlink creation in rc4.d. Runlevel 4 was specified in Default-Start since a very long time. Then it was copied also to the new xen-watchdog in 21861:fb3649141e19. Until now this was not an issue since only xencommons is automatically enabled during package install, and a custom xend and xendomains script is included in the SuSE packages. Since some time a rpmlint check complains about the wrong Default-Start entry in xen-watchdog. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
89 lines
1.4 KiB
Bash
89 lines
1.4 KiB
Bash
#! /bin/bash
|
|
#
|
|
# xen-watchdog
|
|
#
|
|
# chkconfig: 2345 21 79
|
|
# description: Run domain watchdog daemon
|
|
### BEGIN INIT INFO
|
|
# Provides: xen-watchdog
|
|
# Required-Start: $syslog $remote_fs
|
|
# Should-Start: xend
|
|
# Required-Stop: $syslog $remote_fs
|
|
# Should-Stop: xend
|
|
# Default-Start: 2 3 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: Start/stop xen-watchdog
|
|
# Description: Run domain watchdog daemon.
|
|
### END INIT INFO
|
|
#
|
|
|
|
DAEMON=/usr/sbin/xenwatchdogd
|
|
base=$(basename $DAEMON)
|
|
|
|
# Source function library.
|
|
if [ -e /etc/init.d/functions ] ; then
|
|
. /etc/init.d/functions
|
|
elif [ -e /lib/lsb/init-functions ] ; then
|
|
. /lib/lsb/init-functions
|
|
success () {
|
|
log_success_msg $*
|
|
}
|
|
failure () {
|
|
log_failure_msg $*
|
|
}
|
|
else
|
|
success () {
|
|
echo $*
|
|
}
|
|
failure () {
|
|
echo $*
|
|
}
|
|
fi
|
|
|
|
start() {
|
|
local r
|
|
echo -n $"Starting domain watchdog daemon: "
|
|
|
|
$DAEMON 30 15
|
|
r=$?
|
|
[ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup"
|
|
echo
|
|
|
|
return $r
|
|
}
|
|
|
|
stop() {
|
|
local r
|
|
echo -n $"Stopping domain watchdog daemon: "
|
|
|
|
killall -USR1 $base 2>/dev/null
|
|
r=$?
|
|
[ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop"
|
|
echo
|
|
|
|
return $r
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
status)
|
|
;;
|
|
condrestart)
|
|
stop
|
|
start
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
|
exit 1
|
|
esac
|
|
|