From 6235108700462cc4b425ae7a697915f8147f46c3 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 13 Mar 2009 10:37:36 +0100 Subject: [PATCH] s390-tools-1.8.0-initscript-fix --- etc/init.d/cpuplugd | 21 +++++++++++++++------ etc/init.d/dumpconf | 9 ++++++--- etc/init.d/mon_statd | 31 ++++++++++++++++++++++--------- 3 files changed, 43 insertions(+), 18 deletions(-) diff --git a/etc/init.d/cpuplugd b/etc/init.d/cpuplugd index f8df06b..cbd5f90 100755 --- a/etc/init.d/cpuplugd +++ b/etc/init.d/cpuplugd @@ -1,16 +1,18 @@ #!/bin/bash ### BEGIN INIT INFO # Provides: cpuplugd -# Required-Start: $remote_fs -# Required-Stop: $remote_fs -# Default-Start: 1 2 3 4 5 -# Default-Stop: 0 6 +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 # Short-Description: Start the cpu hotplug daemon for Linux on System z # Description: Starts the cpuplugd. It uses the configuration # file /etc/sysconfig/cpuplugd ### END INIT INFO -# chkconfig: 12345 01 99 +# chkconfig: - 01 99 DAEMON=cpuplugd DAEMON_PATH=/usr/sbin/cpuplugd @@ -26,7 +28,13 @@ start() { if [ ! -f $RUN_PID_FILE ]; then echo -n $"Starting $DAEMON:" - $DAEMON_PATH $OPTIONS && log_success_msg || log_failure_msg + $DAEMON_PATH $OPTIONS + if [ $? == "0" ]; then + touch /var/lock/subsys/cpuplugd + log_success_msg + else + log_failure_msg + fi echo else echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is already running..." @@ -41,6 +49,7 @@ stop() killproc $DAEMON_PATH -TERM log_success_msg rm -f $RUN_PID_FILE + rm -f /var/lock/subsys/cpuplugd else log_failure_msg fi diff --git a/etc/init.d/dumpconf b/etc/init.d/dumpconf index 1f719f5..3935582 100644 --- a/etc/init.d/dumpconf +++ b/etc/init.d/dumpconf @@ -3,14 +3,14 @@ # Provides: dumpconf # Required-Start: $local_fs # Required-Stop: $local_fs -# Default-Start: 1 2 3 4 5 -# Default-Stop: 0 6 +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 # Short-Description: Configure s390 dump feature # Description: Configures the s390 dump feature. It uses the configuration file # /etc/sysconfig/dumpconf ### END INIT INFO -# chkconfig: 12345 01 99 +# chkconfig: - 01 99 DUMP_CONFIG_FILE=/etc/sysconfig/dumpconf @@ -320,6 +320,8 @@ start() echo stop > $ON_PANIC_CONFIG_FILE echo "ERROR: $ERRMSG Check $DUMP_CONFIG_FILE!" >&2 return $RETVAL + else + touch /var/lock/subsys/dumpconf fi return $RETVAL @@ -334,6 +336,7 @@ stop() else echo "Disabling dump on panic failed" >&2 fi + rm -f /var/lock/subsys/dumpconf return $RETVAL } diff --git a/etc/init.d/mon_statd b/etc/init.d/mon_statd index 18f920b..fe1e0e4 100755 --- a/etc/init.d/mon_statd +++ b/etc/init.d/mon_statd @@ -1,16 +1,18 @@ #!/bin/bash ### BEGIN INIT INFO # Provides: mon_statd -# Required-Start: $remote_fs -# Required-Stop: $remote_fs -# Default-Start: 1 2 3 4 5 -# Default-Stop: 0 6 +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 # Short-Description: Configure the mon_fsstatd and mon_procd daemons. # Description: Configures the mon_fsstatd and mon_procd daemons. It uses the # configuration file /etc/sysconfig/mon_statd. ### END INIT INFO -# chkconfig: 12345 01 99 +# chkconfig: - 01 99 DAEMON=mon_statd FSSTATD=mon_fsstatd @@ -45,16 +47,26 @@ start() if [ ! -f $FSSTATD_PID_FILE -a "$FSSTAT" = "yes" ]; then echo -n $"Starting $FSSTATD:" - $FSSTATD_PATH -i $FSSTAT_INTERVAL && log_success_msg || - log_failure_msg + $FSSTATD_PATH -i $FSSTAT_INTERVAL + if [ $? == 0 ]; then + touch /var/lock/subsys/mon_statd + log_success_msg + else + log_failure_msg + fi elif [ "$FSSTAT" = "yes" ]; then echo "$FSSTATD (pid $(cat $FSSTATD_PID_FILE)) is already running..." fi if [ ! -f $PROCD_PID_FILE -a "$PROC" = "yes" ]; then echo -n $"Starting $PROCD:" - $PROCD_PATH -i $PROC_INTERVAL && log_success_msg || - log_failure_msg + $PROCD_PATH -i $PROC_INTERVAL + if [ $? == 0 ]; then + touch /var/lock/subsys/mon_statd + log_success_msg + else + log_failure_msg + fi elif [ "$PROC" = "yes" ]; then echo "$PROCD (pid $(cat $PROCD_PID_FILE)) is already running..." fi @@ -80,6 +92,7 @@ stop() else log_failure_msg fi + rm -f /var/lock/subsys/mon_statd echo } -- 1.6.0.6