Commit 9226f2b5 authored by Austin Clements's avatar Austin Clements
Browse files

These are scripts/config files necessary in the boot process of a Plab

vserver node.  The process starts with rc.vinit, which is called
either by the service manager, the pnode boot, or by a vnode reboot.
rc.vinit calls vnodesetup, which calls rc.inplab, which calls
plabsetup.
parent f3beec6e
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use libsetup;
#
# Then invoke the bootsetup routine in the library. All the work happens
# in there.
#
plabsetup();
exit 0;
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
. /etc/emulab/paths.sh
echo "Doing Testbed plabsetup configuration ..."
$BINDIR/plabsetup
echo "Touching utmp ..."
touch /var/run/utmp
if [ -x $BOOTDIR/rc.plab ]; then
echo "Configuring Planetlab vserver ..."
$BOOTDIR/rc.plab;
fi
if [ -x $BOOTDIR/rc.rpm ]; then
echo "Installing RPMs ..."
$BOOTDIR/rc.rpm
fi
if [ -x $BOOTDIR/rc.tarballs ]; then
echo "Installing Tarballs ..."
$BOOTDIR/rc.tarballs
fi
if [ -s $BOOTDIR/startupcmd ]; then
echo "Scheduling startup command to run in a little bit ..."
$BINDIR/runstartup
fi
# XXX Can this run in Plab?
if [ -x $BINDIR/watchdog ]; then
echo "Starting update watchdog ..."
$BINDIR/watchdog start
fi
echo "Informing the testbed that we're up and running ..."
$BINDIR/tmcc state ISUP
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
. /etc/emulab/paths.sh
#
# This is run to bring up a vserver on Plab. It calls out to vnodesetup
# to tell it we're either booting or rebooting (currently not implemented
# by Plab)
#
# There are three ways this can be invoked by Plab/Emulab:
# * During physical node boot, by S99vserver-init
# * By the Emulab custom service manager, when the sliver if first
# brought up
# * By vnodesetup (running inside the vserver) when it is asked to
# reboot the vnode, after it has killed off everything
#
# Once vnodesetup has done its thing, rc.inplab is called to actually
# bring up the vnode
#
# XXX Super-kludge to figure out vnodeid until the svm works
# Only works on Flux Plab nodes
VNODEID=`hostname -s | sed -e 's/planetlab\(.\)/pcplab\1/'`
if [ -e /home/utah6 ]; then
VNODEID=${VNODEID}-1;
elif [ -e /home/utah7 ]; then
VNODEID=${VNODEID}-2;
else
echo Must run as utah6 or utah7;
fi
# See how we were called.
case "$1" in
start)
echo "Booting vnode $VNODEID"
echo 'See /var/emulab/logs/* for details'
$BINDIR/vnodesetup -b -p $VNODEID
;;
stop)
$BINDIR/vnodesetup -h -p $VNODEID
;;
*)
echo "Usage: rc.vinit {start|stop}"
exit 1
esac
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
%root ALL=(ALL) NOPASSWD: ALL
# XXX For testing
utah6 ALL=(ALL) ALL
utah7 ALL=(ALL) ALL
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