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
|
#!/bin/sh
# Copyright (C) 2004 International Business Machines Corporation and others.
# All Rights Reserved. This program and the accompanying
# materials are made available under the terms of the
# Common Public License v1.0 which accompanies this distribution.
#
# Author: Brian King <brking@us.ibm.com>
#
# iprupdate
#
# System startup script for the ipr microcode update facility
#
### BEGIN INIT INFO
# Provides: iprupdate
# Required-Start: $local_fs
# Should-Start: $remote_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the iprupdate utility
# Description: Start the iprupdate utility
### END INIT INFO
IPRUPDATE=@sbindir@/iprupdate
test -x $IPRUPDATE || exit 5
. /lib/init/vars.sh
. /lib/lsb/init-functions
start() {
if [ ! -d /sys/class/scsi_generic ] ; then
modprobe sg
fi
start_daemon $IPRUPDATE --daemon
}
stop() {
killproc $IPRUPDATE
}
status() {
status_of_proc $IPRUPDATE iprupdate
}
case "$1" in
start)
[ "$VERBOSE" = no ] || log_daemon_msg "Checking ipr microcode levels" iprupdate
start
[ "$VERBOSE" = no ] || log_end_msg $?
;;
stop)
[ "$VERBOSE" = no ] || log_daemon_msg "Shutting down ipr update daemon" iprupdate
stop
[ "$VERBOSE" = no ] || log_end_msg $?
;;
restart|reload|force-reload)
[ "$VERBOSE" = no ] || log_daemon_msg "Restarting ipr update daemon" iprupdate
stop && start
[ "$VERBOSE" = no ] || log_end_msg $?
;;
status)
status
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
;;
esac
|