/etc/init.d/libstoragemgmtd is in libstoragemgmtd 0.0.20-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | #!/bin/bash
#
# chkconfig: 2345 99 1
### BEGIN INIT INFO
# Provides: libstoragemgmtd
# Required-Start: $remote_fs $local_fs
# Required-Stop: $remote_fs $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: libStorageMgmt plug-in daemon
# Description: libStorageMgmt plug-in daemon
### END INIT INFO
. /lib/lsb/init-functions
NAME=lsmd
PROG=/usr/bin/$NAME
PID=/var/run/lsm/lsmd.pid
LOCK=/var/lock/subsys/libstoragemgmtd
DAEMON=libstoragemgmtd
PYTHON=/usr/bin/python
RETVAL=0
STATUS=0
if [ "`id -u`" != 0 ] ; then
echo "Not root"
exit 4
fi
check_dirs() {
test -d /var/run/lsm || mkdir -p /var/run/lsm/ipc
test -d /var/run/lsm/ipc || mkdir -p /var/run/lsm/ipc
# And fix ownership
chown libstoragemgmt.libstoragemgmt -R /var/run/lsm
}
start_lsm() {
log_daemon_msg "Starting $NAME daemon:"
start-stop-daemon --start --quiet --pidfile $PID --exec $PROG
RETVAL=$?
log_end_msg $RETVAL
}
stop_lsm() {
log_daemon_msg "Stopping $NAME daemon:"
start-stop-daemon --stop --quiet --signal TERM --pidfile $PID --exec $PYTHON -- --operation stop
log_end_msg 0
}
# See how we were called.
case "$1" in
start)
check_dirs
start_lsm
;;
force-stop|stop)
stop_lsm
;;
force-reload | reload)
check_dirs
log_daemon_msg "Reloading $NAME daemon:"
pkill -F $PID --signal HUP $NAME
log_end_msg 0
;;
restart)
stop_lsm
check_dirs
start_lsm
;;
status)
status_of_proc -p $PID $PROG "libstoragemgmtd daemon" && return 0 || return $?
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status|force-stop}"
;;
esac
exit $RETVAL
|