Commit be9cb211 authored by Ryan Jackson's avatar Ryan Jackson

Now works as both frisbee and admin MFS. Since most (all?) users have

tcsh as their shell, I've included a bourne shell script called tcsh that
just execs /bin/sh so that these users can log in via ssh or the console.
tcsh isn't necessary and just makes the image larger.
parent 925819c9
#! /bin/sh
# This is a hack to allow users with tcsh
# as their shell to log in to the admin mfs.
# Of course, it doesn't work like tcsh. But
# including tcsh is overkill and unnecessary.
exec /bin/sh $@
#!/bin/sh
#
# Start frisbee
# Do Emulab stuff
#
udhcpc_opts="-q"
if [ -f /etc/emulab/paths.sh ]; then
. /etc/emulab/paths.sh
else
BINDIR=/etc/testbed
fi
LOCKDIR=/var/lock/udhcpc.lock
SUCCESS_FLAG=/var/state/found_controlnet
mode=admin
start() {
local do_frisbee=0
for token in `cat /proc/cmdline`; do
if [ "$token" = "frisbee=yes" ]; then
do_frisbee=1
break
fi
case $token in
elab_mode=*) mode=${token##*=} ;;
esac
done
[ $do_frisbee -eq 0 ] && exit 0
echo "Starting frisbee..."
/etc/testbed/rc.frisbee
return $rc
case $mode in
admin)
script=$BINDIR/rc.mfs
;;
newnode)
script=$BINDIR/newclient
;;
frisbee)
script=$BINDIR/rc.frisbee
;;
*)
echo "Invalid mode \"$mode\"" 1>&2
script=$BINDIR/rc.mfs
;;
esac
echo "Starting ${script##*/}..."
exec $script
}
stop() {
......
......@@ -85,6 +85,12 @@ script-install:
install -m 755 $(TMCD_PATH)/common/config/rc.accounts $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.hostnames $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.keys $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.startcmd $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/runstartup $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/linux/create-image $(TARGET_PATH)/etc/testbed
mkdir -p $(TARGET_PATH)/usr/local/bin
ln -sf /usr/bin/imagezip $(TARGET_PATH)/usr/local/bin
ln -sf /etc/testbed/create-image $(TARGET_PATH)/usr/local/bin
touch $(TARGET_PATH)/etc/emulab/ismfs
imageunzip-install: $(TARGET_PATH)/usr/bin/imageunzip
......
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