2009-12-15 14:25:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
# chkconfig: 345 84 59
|
|
|
|
# description: service node postboot script hack
|
|
|
|
# processname: xcatpostinit
|
|
|
|
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: xcatpostinit
|
|
|
|
# Default-Start: 3 4 5
|
|
|
|
# Default-stop: 0 1 2 6
|
2010-08-17 02:53:16 +00:00
|
|
|
# Required-Start: $network $syslog
|
2009-12-15 14:25:36 +00:00
|
|
|
# Required-Stop:
|
|
|
|
# Short-Description: xCATpost
|
|
|
|
# Description: xCAT post boot script
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
# Source function library.
|
|
|
|
if [ -x /etc/rc.d/init.d/functions ]; then
|
|
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
status)
|
|
|
|
echo -n "xcatpostinit1 runs only at boot, runs additional post scripts"
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
echo -n "nothing to stop "
|
|
|
|
;;
|
|
|
|
start)
|
2012-08-31 15:52:31 +00:00
|
|
|
# check for the REBOOT specified in xcatinfo to run post boot scripts on reboot
|
|
|
|
if [ -f /opt/xcat/xcatinfo ]; then
|
|
|
|
REBOOT=`grep 'REBOOT' /opt/xcat/xcatinfo |cut -d= -f2`
|
|
|
|
fi
|
|
|
|
# if the xcatdsklspost file exists and this is a reboot - run xcatdsklspost with a mode of 6
|
2012-09-17 11:12:39 +00:00
|
|
|
if [ "$REBOOT" = "TRUE" -a -r /opt/xcat/xcatdsklspost ]; then
|
2012-08-31 15:52:31 +00:00
|
|
|
/opt/xcat/xcatdsklspost 6
|
|
|
|
else
|
|
|
|
# run /opt/xcat/xcatinstallpost
|
|
|
|
if [ -r /opt/xcat/xcatinstallpost ]; then
|
|
|
|
/opt/xcat/xcatinstallpost
|
|
|
|
fi
|
2009-12-15 14:25:36 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|