etc/init.d: Remove SysV related daemon scripts

For cpacfstatsd, cpuplugd, and mon_statd there are still SysV daemon
scripts available. However, modern distributions use systemd and
corresponding systemd unit files are provided and in use for a long time
already.

Remove the daemon scripts for the obsolete SysV init system as they're
not used by modern systems anymore.

Acked-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Jan Höppner
2022-05-12 18:45:55 +02:00
parent 773d01e674
commit 508253c666
3 changed files with 0 additions and 366 deletions

View File

@@ -1,89 +0,0 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: cpacfstatsd
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Start the cpacfstatsd daemon for Linux on System z
# Description: CPACF statistics collection daemon process for Linux on System z
### END INIT INFO
DAEMON=cpacfstatsd
DAEMON_PATH=/usr/sbin/cpacfstatsd
RUN_PID_FILE=/run/cpacfstatsd.pid
RETVAL=0
OPTIONS=""
# source function library
. /lib/lsb/init-functions
start()
{
if [ ! -f $RUN_PID_FILE ]; then
echo -n $"Starting $DAEMON:"
$DAEMON_PATH $OPTIONS
if [ $? == "0" ]; then
log_success_msg
else
log_failure_msg
fi
echo
else
echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is already running..."
echo
fi
}
stop()
{
echo -n $"Stopping $DAEMON:"
if [ -f $RUN_PID_FILE ]; then
killproc $DAEMON_PATH -TERM
log_success_msg
rm -f $RUN_PID_FILE
else
log_failure_msg
fi
echo
}
restart() {
stop
sleep 1
start
}
status()
{
if [ ! -f $RUN_PID_FILE ]; then
echo "$DAEMON is not running."
echo
else
echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is running."
echo
fi
}
# How are we called?
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
restart
;;
*)
echo "Usage: $DAEMON {start|stop|status|restart}"
RETVAL=1
esac
exit $RETVAL

View File

@@ -1,116 +0,0 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: cpuplugd
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Start the cpu hotplug daemon for Linux on System z
# Description: Starts the cpuplugd. It uses the configuration
# file /etc/cpuplugd.conf
### END INIT INFO
# chkconfig: 235 01 99
DAEMON=cpuplugd
DAEMON_PATH=/usr/sbin/cpuplugd
CONFIG_FILE=/etc/cpuplugd.conf
RUN_PID_FILE=/run/cpuplugd.pid
RETVAL=0
OPTIONS="-c $CONFIG_FILE"
# source function library
. /lib/lsb/init-functions
start()
{
if [ ! -f $RUN_PID_FILE ]; then
echo -n $"Starting $DAEMON:"
$DAEMON_PATH $OPTIONS
if [ $? == "0" ]; then
log_success_msg
else
log_failure_msg
fi
echo
else
echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is already running..."
echo
fi
}
stop()
{
echo -n $"Stopping $DAEMON:"
if [ -f $RUN_PID_FILE ]; then
killproc $DAEMON_PATH -TERM
log_success_msg
rm -f $RUN_PID_FILE
else
log_failure_msg
fi
echo
}
restart() {
stop
#
# We have to wait 2-3 seconds here. When the daemon is stopped it takes
# the time we sleep to reactivate cpus. If we restart to fast and
# cpuplugd wasn't able to restore some settings we may get a undesired
# online cpu count after cpuplugd shutdown
#
sleep 4
start
}
status()
{
if [ ! -f $RUN_PID_FILE ]; then
echo "$DAEMON is not running."
echo
else
echo "$DAEMON (pid $(cat $RUN_PID_FILE), options: $OPTIONS) is running."
echo
fi
}
reload()
{
echo -n $"Reloading $DAEMON: "
if [ -f $RUN_PID_FILE ]; then
killproc $DAEMON_PATH -HUP
log_success_msg
else
log_failure_msg
fi
RETVAL=$?
echo
}
# How are we called?
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
restart
;;
reload|force-reload)
reload
;;
*)
echo "Usage: $DAEMON {start|stop|status|restart|reload}"
RETVAL=1
esac
exit $RETVAL

View File

@@ -1,161 +0,0 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: mon_statd
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 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: 235 01 99
DAEMON=mon_statd
FSSTATD=mon_fsstatd
PROCD=mon_procd
FSSTATD_PATH=/usr/sbin/$FSSTATD
PROCD_PATH=/usr/sbin/$PROCD
CONFIG_FILE=/etc/sysconfig/$DAEMON
FSSTATD_PID_FILE=/run/$FSSTATD.pid
PROCD_PID_FILE=/run/$PROCD.pid
# source function library
. /lib/lsb/init-functions
# Source config file
if [ -f $CONFIG_FILE ]; then
. $CONFIG_FILE
fi
UDEVSETTLE=/usr/bin/udevadm
if [ ! -e $UDEVSETTLE ]
then
UDEVSETTLE=/sbin/udevsettle
UDEVSETTLE_CALL="$UDEVSETTLE --timeout=10"
else
UDEVSETTLE_CALL="$UDEVSETTLE settle --timeout=10"
fi
load_kernel_module()
{
if [ ! -e /dev/monwriter ]; then
echo "Loading monwriter module..."
modprobe monwriter 2>&1
if [ $? -ne 0 ]; then
exit 1
fi
if [ -e $UDEVSETTLE ]
then
$UDEVSETTLE_CALL
fi
fi
}
start_daemon()
{
local daemon_name=$1
local daemon_interval=$2
local daemon_pid_file=$3
local daemon_path=$4
if [ ! -f $daemon_pid_file ]; then
load_kernel_module
echo -n "Starting $daemon_name:"
$daemon_path -i $daemon_interval
if [ $? -eq 0 ]; then
log_success_msg
else
log_failure_msg
fi
else
echo "$daemon_name (pid $(cat $daemon_pid_file)) is already running..."
fi
}
start()
{
if [ "$FSSTAT" = "yes" ]; then
start_daemon $FSSTATD $FSSTAT_INTERVAL $FSSTATD_PID_FILE \
$FSSTATD_PATH
fi
if [ "$PROC" = "yes" ]; then
start_daemon $PROCD $PROC_INTERVAL $PROCD_PID_FILE \
$PROCD_PATH
fi
}
stop_daemon()
{
local daemon_name=$1
local daemon_pid_file=$2
local daemon_path=$3
echo -n "Stopping $daemon_name:"
if [ -f $daemon_pid_file ]; then
killproc $daemon_path -TERM
log_success_msg
rm -f $daemon_pid_file
else
log_failure_msg
fi
}
stop()
{
if [ "$FSSTAT" = "yes" ]; then
stop_daemon $FSSTATD $FSSTATD_PID_FILE $FSSTATD_PATH
fi
if [ "$PROC" = "yes" ]; then
stop_daemon $PROCD $PROCD_PID_FILE $PROCD_PATH
fi
}
restart() {
stop
start
}
status_daemon()
{
local daemon_name=$1
local daemon_pid_file=$2
local daemon_interval=$3
if [ ! -f $daemon_pid_file ]; then
echo "$daemon_name is not running."
else
echo "$daemon_name (pid $(cat $daemon_pid_file), interval: $daemon_interval) is running."
fi
}
status()
{
status_daemon $FSSTATD $FSSTATD_PID_FILE $FSSTAT_INTERVAL
status_daemon $PROCD $PROCD_PID_FILE $PROC_INTERVAL
}
# How are we called?
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart|reload|force-reload)
restart
;;
*)
echo "Usage: $DAEMON {start|stop|status|restart|reload}"
exit 1
esac
exit 0