| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/rc5.d/ |
Upload File : |
#!/bin/bash
#
# yum This shell script enables automated checkins with Smolt
#
# Author: Seth Vidal <skvidal@phy.duke.edu>
# Mike McGrath <mmcgrath@redhat.com>
#
# chkconfig: - 90 01
#
# description: Enable monthly update of Smolt
# processname: smolt
#
# source function library
. /etc/rc.d/init.d/functions
lockfile=/var/lock/subsys/smolt
RETVAL=0
start() {
echo -n $"Enabling monthly Smolt checkin: "
if ! [ -f /etc/smolt/hw-uuid ]
then
echo
echo "Generating UUID"
/bin/cat /proc/sys/kernel/random/uuid > /etc/smolt/hw-uuid
/bin/chmod 0644 /etc/smolt/hw-uuid
/bin/chown root:root /etc/smolt/hw-uuid
fi
touch "$lockfile" && success || failure
RETVAL=$?
echo
}
stop() {
echo -n $"Disabling monthly Smolt update: "
/bin/rm "$lockfile" 2> /dev/null && success || failure
RETVAL=$?
echo
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|force-reload)
restart
;;
reload)
;;
condrestart)
[ -f "$lockfile" ] && restart
;;
status)
if [ -f $lockfile ]; then
echo $"Monthly smolt check-in is enabled."
RETVAL=0
else
echo $"Monthly smolt check-in is disabled."
RETVAL=3
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
exit 1
esac
exit $RETVAL