Commit 30a32df0 authored by Kirk Webb's avatar Kirk Webb

Bag of goodies to support a CentOS 6 image.

A closer inspection of the 'fedora' case that I had been using revealed
that a few changes needed to be made for the CentOS 6 environment.  This
is loosely based on the fedora15 case, but stripped down and cleaned up
some.
parent dac3a614
......@@ -4954,6 +4954,7 @@ outfiles="Makeconf GNUmakefile setversion \
tmcc/cygwinxp/GNUmakefile tmcc/dp/GNUmakefile \
tmcc/openbsd/GNUmakefile tmcc/ron/GNUmakefile \
tmcc/plab/GNUmakefile tmcc/cygwinseven/GNUmakefile \
tmcc/centos6/GNUmakefile \
os/GNUmakefile os/syncd/GNUmakefile \
os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile \
os/frisbee.redux/GNUmakefile \
......
......@@ -279,6 +279,7 @@ outfiles="Makeconf GNUmakefile setversion \
tmcc/cygwinxp/GNUmakefile tmcc/dp/GNUmakefile \
tmcc/openbsd/GNUmakefile tmcc/ron/GNUmakefile \
tmcc/plab/GNUmakefile tmcc/cygwinseven/GNUmakefile \
tmcc/centos6/GNUmakefile \
os/GNUmakefile os/syncd/GNUmakefile \
os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile \
os/frisbee.redux/GNUmakefile \
......
......@@ -106,7 +106,7 @@ else
MDSUBDIR = fedora
endif
endif
ifeq ($(findstring centos,$(MDSUBDIR)),centos)
ifeq ($(MDSUBDIR),centos5)
MDSUBDIR = fedora
endif
ifeq ($(MDSUBDIR),stargate1)
......
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
#
# XXX ONLY RUN THIS INSTALL ON A LINUX TESTBED NODE!
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
#
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
include $(OBJDIR)/Makeconf
SCRIPTS =
MYINSTALL = $(SRCDIR)/myinstall
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: ifcfgs
include $(TESTBED_SRCDIR)/GNUmakerules
SYSETCDIR = $(DESTDIR)/etc
ETCDIR = $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR = $(DESTDIR)$(CLIENT_BINDIR)
VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(SYSETCDIR)/rc.d
INSTALL = /usr/bin/install -c
COMMON = $(SRCDIR)/../common
install client-install: baselinux-client-install common-install etc-install \
script-install bin-install
@echo "Remember to install the PEM files if necessary"
mfs-install: client-install baselinux-mfs-install
frisbee-mfs-install: baselinux-frisbee-mfs-install
simple-install: common-install script-install bin-install
openvz-install: baselinux-common-install common-install \
baselinux-script-install script-install \
baselinux-openvz-install etc-install
dir-install:
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/init.d
baselinux-%: dir-install
(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) $(subst baselinux-,,$@))
common-install: dir-install
@echo "no centos6-specific common files"
bin-install: dir-install
@echo "no centos6-specific bin files"
etc-install: dir-install sysetc-remove sysetc-install
$(INSTALL) -m 755 $(SRCDIR)/testbed $(RCDIR)/init.d/testbed
$(INSTALL) -m 755 $(SRCDIR)/rc.local $(RCDIR)/rc.local
sysetc-install: ifcfgs dir-install
$(INSTALL) -m 644 $(SRCDIR)/ntp.conf $(SYSETCDIR)/ntp.conf
$(INSTALL) -m 644 $(SRCDIR)/ifcfg-eth99 $(SYSETCDIR)/sysconfig/network-scripts
$(INSTALL) -m 644 ifcfg-eth[0-9]* $(SYSETCDIR)/sysconfig/network-scripts
$(INSTALL) -m 644 $(SRCDIR)/logrotate-syslog $(SYSETCDIR)/logrotate.d/syslog
-ln -sf $(SYSETCDIR)/dhclient-enter-hooks $(SYSETCDIR)/dhcp/dhclient-enter-hooks
-ln -sf $(SYSETCDIR)/dhclient-exit-hooks $(SYSETCDIR)/dhcp/dhclient-exit-hooks
sysetc-remove:
rm -rf $(SYSETCDIR)/modules.conf $(SYSETCDIR)/ntp.conf $(SYSETCDIR)/cron.pend
# stuff we don't really need to do all the time and may not even be correct
# or sufficient for all FCs
sysetc-onceonly-install:
@$(MYINSTALL) -m 600 $(SRCDIR)/securetty $(SYSETCDIR)/securetty
@$(MYINSTALL) -m 440 $(SRCDIR)/sudoers $(SYSETCDIR)/sudoers
@$(MYINSTALL) $(SRCDIR)/rsyslog.conf $(SYSETCDIR)/rsyslog.conf
@$(MYINSTALL) $(SRCDIR)/selinux-config $(SYSETCDIR)/selinux/config
script-install: dir-install $(SCRIPTS)
@echo "no centos6-specific script files"
sfs-install:
@echo "no centos6-specific sfs files"
# create ifcfg-eth? files
ifcfgs: $(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
$(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
clean:
rm -f ifcfg-eth?
#/bin/sh -
#
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
#
# HACK: run dhclient on all interfaces, and do nothing else
# (well, now also bring up a widearea node control net statically if asked)
#
# Note that this file's name (eth99) cannot overlap with an actual
# existing interface or dhclient will loop. dhclient-script invokes
# the source-config function which sources the ifcfg-ethN file. Thus
# if this script were called "ifcfg-eth0" and eth0 was the DHCPable
# interface, we would wind up recursively invoking dhclient (trust me,
# I tried it :-)
#
. /etc/emulab/paths.sh
DEVICE="eth99"
IFACETYPES="3c59x e100 e1000 tulip e1000e tg3"
#
# First, probe for all our supported ethernet types
#
modprobe -qa $IFACETYPES
interfaces=`ifconfig -a | sed -n 's/^\([^ ]*\).*encap:Ethernet.*$/\1/p'`
#
# Check: are we a remote node? If so, possibly try static config in pref
# to dhcp.
#
if [ -e /etc/emulab/isrem -a -e /etc/emulab/waconfig ]; then
. /etc/emulab/waconfig
echo "Found Emulab widearea config info..."
if [ "$WA_BOOTMETHOD" = "static" -a "$WA_MAC" != "" ]; then
# try to find an iface matching WA_MAC
cnetif=""
for _if in $interfaces; do
ifconfig $_if | grep HWaddr | sed -e 's/.*HWaddr\s*\(.*\)/\1/' \
| grep -q -i "$WA_MAC"
if [ "$?" = "0" ]; then
cnetif="$_if"
break
fi
done
if [ "$cnetif" = "" ]; then
echo "Could not find iface with MAC $WA_MAC; trying DHCP!"
WA_BOOTMETHOD="dhcp"
elif [ "$WA_HOSTNAME" = "" \
-o "$WA_DOMAIN" = "" \
-o "$WA_IP_ADDR" = "" \
-o "$WA_IP_NETMASK" = "" \
-o "$WA_IP_GATEWAY" = "" \
-o "$WA_IP_DNS1" = "" ]; then
echo "Missing static IP config vars; trying DHCP!"
WA_BOOTMETHOD="dhcp"
fi
fi
fi
#
# Try static config if all its constraints above are met...
#
if [ "$WA_BOOTMETHOD" = "static" ]; then
echo "Statically configuring control net on $cnetif ..."
ifconfig "$cnetif" inet "$WA_IP_ADDR" netmask "$WA_IP_NETMASK" up
route add default gateway "$WA_IP_GATEWAY"
# bring up lo too just to make sure it's up
ifconfig lo inet 127.0.0.1 up
route add -net 127.0.0.0/8 dev lo
# setup resolv.conf
echo "search $WA_DOMAIN" > /etc/resolv.conf
echo "nameserver $WA_IP_DNS1" >> /etc/resolv.conf
if [ x"$WA_IP_DNS2" != x ]; then
echo "nameserver $WA_IP_DNS2" >> /etc/resolv.conf
fi
# set hostname
hosts_str="$WA_HOSTNAME"
echo "$WA_HOSTNAME" | grep -q \\.
if [ $? = 0 ]; then
hostname "$WA_HOSTNAME"
else
hostname "${WA_HOSTNAME}.${WA_DOMAIN}"
hosts_str="${WA_HOSTNAME}.${WA_DOMAIN} ${hosts_str}"
fi
# setup hosts file
echo "$WA_IP_ADDR ${hosts_str}" >> /etc/hosts
# setup a few necessary emulab files...
echo "$cnetif" > $BOOTDIR/controlif
if [ -e "/etc/emulab/bossnode" ]; then
bossnode=`cat /etc/emulab/bossnode`
bossip=`host -t A "$bossnode"`
retval="$?"
i=0
while [ "$retval" != "0" -a $i -lt 6 ]; do
bossip=`host -t A "$bossnode"`
retval="$?"
i=`expr $i + 1`
sleep 5
done
echo `echo "$bossip" | sed -n -e 's/.*has address\s*\(.*\)/\1/p'` \
> $BOOTDIR/bossip
fi
echo "$WA_HOSTNAME" > $BOOTDIR/realname
echo "$WA_IP_GATEWAY" > $BOOTDIR/routerip
echo "$WA_IP_ADDR" > $BOOTDIR/myip
echo "$WA_IP_NETMASK" > $BOOTDIR/mynetmask
exit 0
fi
#
# else default to dhclient...
#
#
# If dhclient returns success, then it has configured the first interface
# and gone into background mode. At that point we don't care about it any
# more and just kill it. We also shutdown all the other interfaces (which
# dhclient will leave "up") and set ONBOOT=no to prevent ifup (our caller)
# from doing any further configuration on this fake interface.
#
echo "Discovering control net via dhcp ..."
if [ -x /sbin/dhclient ] && /sbin/dhclient -q $interfaces; then
killall dhclient
if [ -e $BOOTDIR/controlif ]; then
interface=`cat $BOOTDIR/controlif`
for _if in `ifconfig -s | awk '{ print $1 }' | grep -v Iface`
do
if [ $_if != "lo" -a x$_if != x$interface ]
then
echo "taking $_if down"
ifconfig $_if down
fi >>$LOGDIR/dhclient.log 2>&1
done
#
# Now probe for wifi interfaces. We don't want to
# do this before dhcp'ing on the wired interfaces since
# there is a possibility that the wifi interface will
# grab an address and become the control net!
#
# This expects to load the madwifi-ng driver; the param states
# that no "virtual AP" device is to be created on module load.
# This is deferred until Emulab interface configuration time.
#
modprobe -q ath_pci autocreate=none
fi
ONBOOT="no"
else
# eat flaming death
exit 1
fi
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/emulab.log {
compress
weekly
rotate 2
size 300M
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
#!/bin/sh
#
# Copyright (c) 2004 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
#
# Create some ifcfg-eth files based on a template
#
if [ $# != 1 ]; then
echo "usage: $0 template-file"
exit 1
fi
for netif in 0 1 2 3 4 5 6 7 8 9; do
cat > ifcfg-eth${netif} <<FOO
#
# Auto-generated by $0.
# You know the drill: DO NOT EDIT, blah, blah, blah...
#
# ifcfg_eth99 is where the Emulab control net setup takes place,
# it invokes dhclient on all interfaces. However, dhclient-script
# expects to find an ifcfg_ethN file for each interface it wants to
# probe. So we put a stub here that does nothing (courtesy of ONBOOT=no).
#
DEVICE="eth${netif}"
ONBOOT="no"
FOO
cat $1 >> ifcfg-eth${netif}
done
#!/bin/sh
if [ $# -lt 2 ]; then
echo "usage: myinstall [-m mode] src-file dst-file"
exit 1
fi
if [ $1 = "-m" ]; then
shift
MODE=$1
shift
else
MODE=644
fi
SRC=$1
DST=$2
if [ ! -e $SRC ]; then
echo "myinstall: no such file $SRC"
exit 1
fi
if [ -e $DST ]; then
if [ ! -f $SRC -o ! -f $DST ]; then
echo "myinstall: only works with regular files"
exit 1
fi
cmp -s $SRC $DST || {
install -m $MODE $SRC $DST
echo "$SRC installed $MODE as $DST"
}
else
if [ ! -f $SRC ]; then
echo "myinstall: only works with regular files"
exit 1
fi
install -m $MODE $SRC $DST
echo "$SRC installed $MODE as $DST"
fi
# Prohibit general access to this service.
restrict default noserve
restrict -6 default noserve
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1
#
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
# Permit all access from the Emulab server
restrict ntp1.emulab.net
server ntp1.emulab.net
#!/bin/sh
#
# Copyright (c) 2004 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
echo "Boot Complete"
# rsyslog v5 configuration file
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
#### MODULES ####
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides --MARK-- message capability
# Provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
#### GLOBAL DIRECTIVES ####
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on
# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf
#### RULES ####
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# For the testbed. Log ssh logins to ops.
# Log errors to console.
# Log everything else to a file.
auth.info @users
local5.err /dev/console
local5.* /var/log/emulab.log
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
# ### end of the forwarding rule ###
console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
ttyS0
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.
## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhaps using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias FILESERVERS = fs1, fs2
# Host_Alias MAILSERVERS = smtp, smtp2
## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem
## Command Aliases
## These are groups of related commands...
## Networking
# Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
## Installation and management of software
# Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
## Services
# Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
## Updating the locate database
# Cmnd_Alias LOCATE = /usr/bin/updatedb
## Storage
# Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
## Delegating permissions
# Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
## Processes
# Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
## Drivers
# Cmnd_Alias DRIVERS = /sbin/modprobe
# Defaults specification
#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
Defaults requiretty
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
%root ALL=(ALL) NOPASSWD: ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
#!/bin/bash
#
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
. /etc/emulab/paths.sh
#
# testbed Do some testbed stuff,
#
# description: On shutdown, it informs the testbed we are rebooting
# and terminates any lingering daemons.