Commit cc479869 authored by Leigh Stoller's avatar Leigh Stoller

Commit the CDROM scripts.

parent 99eb6d2a
afec7ac472aab9ee9d03a9a510ef5746
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
#
# This script goes in /usr/local/etc/rc.d on the disk image.
#
# Set the magic bit that said we booted from the disk okay. Otherwise
# if the CDROM boots and this has not been done, the CDROM assumes the
# disk is scrogged.
#
. /etc/rc.conf.local
#
# rawbootdisk is set in rc.conf.local by the CDROM boot image.
#
case "$1" in
start)
if [ -f /usr/site/sbin/tbbootconfig ]; then
/usr/site/sbin/tbbootconfig -c 1 $rawbootdisk
case $? in
0)
exit 0
;;
*)
echo 'Error in testbed boot header program'
echo 'Reboot failed. HELP!'
exit 1
;;
esac
fi
;;
stop)
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
exit 1
;;
esac
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
#
# The script goes in /etc on the CDROM. Must edit /etc/rc to invoke it
# before doing the network setup.
#
RCCONFLOCAL=/etc/rc.conf.local
#
# This script runs the testbed IP configuration stuff. It will generate the
# above named file, which we then suck in to define the IP config so that
# network configuration will proceed properly.
#
# We also define a routine to call at the end of /etc/rc to change the
# boot header.
#
EmulabCheckIPConfig()
{
if [ -r /usr/site/sbin/waipconfig.pl ]; then
/usr/site/sbin/waipconfig.pl
case $? in
0)
;;
*)
echo 'Error in testbed configuration program'
#reboot
echo 'Reboot failed. HELP!'
exit 1
;;
esac
if [ -r $RCCONFLOCAL ]; then
. $RCCONFLOCAL
else
echo '$RCCONFLOCAL does not exist!'
#reboot
echo 'Reboot failed. HELP!'
exit 1
fi
fi
}
This diff is collapsed.
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
#
# This file goes in /usr/local/etc/rc.d on the CDROM.
#
# Get the rawdisk and pass that to the registration program. It does
# all the actual work.
#
. /etc/rc.conf.local
case "$1" in
start)
if [ -f /usr/site/sbin/register.pl ]; then
/usr/site/sbin/register.pl $rawbootdisk
exit $?
fi
;;
*)
echo "Usage: `basename $0` {start}" >&2
exit 1
;;
esac
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment