4 # Required-Start: $local_fs $remote_fs
5 # Required-Stop: $local_fs $remote_fs
8 # Default-Start: 2 3 4 5
10 # Short-Description: Start the cpu hotplug daemon for Linux on System z
11 # Description: Starts the cpuplugd. It uses the configuration
12 # file /etc/sysconfig/cpuplugd
15 # chkconfig: 2345 01 99
18 DAEMON_PATH
=/usr
/sbin
/cpuplugd
19 CONFIG_FILE
=/etc
/sysconfig
/cpuplugd
20 RUN_PID_FILE
=/var
/run
/cpuplugd.pid
22 OPTIONS
="-c $CONFIG_FILE"
24 # source function library
25 .
/lib
/lsb
/init-functions
29 if [ ! -f $RUN_PID_FILE ]; then
30 echo -n $
"Starting $DAEMON:"
32 if [ $?
== "0" ]; then
33 touch /var
/lock
/subsys
/cpuplugd
40 echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is already running..."
47 echo -n $
"Stopping $DAEMON:"
48 if [ -f $RUN_PID_FILE ]; then
49 killproc
$DAEMON_PATH -TERM
52 rm -f /var
/lock
/subsys
/cpuplugd
62 # We have to wait 2-3 seconds here. When the daemon is stopped it takes
63 # the time we sleep to reactivate cpus. If we restart to fast and
64 # cpuplugd wasn't able to restore some settings we may get a undesired
65 # online cpu count after cpuplugd shutdown
73 if [ ! -f $RUN_PID_FILE ]; then
74 echo "$DAEMON is not running."
77 echo "$DAEMON (pid $(cat $RUN_PID_FILE), options: $OPTIONS) is running."
84 echo -n $
"Reloading $DAEMON: "
85 if [ -f $RUN_PID_FILE ]; then
86 killproc
$DAEMON_PATH -HUP
114 echo "Usage: $DAEMON {start|stop|status|restart|reload}"