Commit d5fa37a4 authored by Mike Hibler's avatar Mike Hibler

No longer needed

parent 25a29bbb
#!/bin/sh
#
# Gak we have to do another level of clone to get into an environment with
# virtualized networking. This is set to be the first and only script run
# when a vserver starts.
#
action=$1
. /etc/init.d/functions
. /etc/emulab/paths.sh
RETVAL=0
case "$action" in
start)
$BINDIR/chpid -i -h -n /bin/sh $BINDIR/vserver/vserver1.sh
RETVAL=$?
;;
stop)
# no idea what to do here yet
kill 0
;;
*)
echo "No can do action \"$1\" bubba"
RETVAL=1
;;
esac
exit $RETVAL
#!/bin/sh
#
# This is the script run by chpid once it has cloned.
# We run all the normal startup scripts.
#
# Now find out what the current and what the previous runlevel are.
argv1="$1"
set `/sbin/runlevel`
runlevel=$2
previous=$1
export runlevel previous
. /etc/init.d/functions
. /etc/emulab/paths.sh
# check a file to be a correct runlevel script
check_runlevel ()
{
# Do not redo the chpid!
[ "$1" = "/etc/rc$runlevel.d/S00chpid" ] && return 1
# Check if the file exists at all.
[ -x "$1" ] || return 1
is_ignored_file "$1" && return 1
return 0
}
RETVAL=0
# Now run the START scripts.
for i in /etc/rc$runlevel.d/S* ; do
check_runlevel "$i" || continue
# Check if the subsystem is already up.
subsys=${i#/etc/rc$runlevel.d/S??}
[ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \
&& continue
update_boot_stage "$subsys"
# Bring the subsystem up.
if [ "$subsys" = "halt" -o "$subsys" = "reboot" ]; then
export LC_ALL=C
exec $i start
fi
if LC_ALL=C egrep -q "^..*init.d/functions" $i \
|| [ "$subsys" = "single" -o "$subsys" = "local" ]; then
$i start
else
action $"Starting $subsys: " $i start
fi
done
exit $RETVAL
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