- 论坛徽章:
- 0
|
#!/bin/sh
#ident "@(#)power.cycle 0.2 97/6/20 SMI" /* SVr4.0 1.1.13.1 */
# copy this script to /etc/rc3.d, then reboot
#
LOGFILE=/power.log.`uname -n`
SLEEP_TIME=60
WAKEUP_TIME=60
ARCH=`uname -m`
if [ $ARCH = "sun4u" ]; then
TOD=`/usr/sbin/modinfo|grep -i " tod "|awk '{print $1}'`
if [ -z "$TOD" ]; then
echo "Attempting to load the tod module"
if [ ! -f /platform/sun4u/kernel/drv/tod ]; then
echo "Copy it from /net/hogan/export/home/gypsy/tests"
# cp -p /net/sparcs/export/estar/596-hw1097/latest/SUNWcpr.u/reloc/platform/sun4u/kernel/drv/tod* \
# cp -p /net/alcoholic/export/home/596-hw1097/latest/SUNWcpr.u/reloc/platform/sun4u/kernel/drv/tod* \
cp -p ./tod* \
/platform/sun4u/kernel/drv/
fi
/usr/sbin/add_drv tod
/usr/sbin/drvconfig
/usr/sbin/devlinks
fi
#
echo "Sleeping for $SLEEP_TIME seconds.........`date`" | tee -a $LOGFILE
wc -l $LOGFILE
/usr/bin/sleep $SLEEP_TIME
/export/set_alarm $WAKEUP_TIME
/usr/sbin/poweroff
fi |
|