Commit f4a25d22 authored by Robert Ricci's avatar Robert Ricci

Support for informing the testbed when we're getting shut down.

This is done by creating a new directory, /etc/testbed/rc.d .
This works just like /usr/local/etc/rc.d . Right now, it
only has one script, which does a 'tmcc state REBOOTING' when
called with the 'stop' argment.

While I'm at it, checked in rc.conf - it contains some testbed
specific things now, so it should be in CVS.
parent 89c6471a
......@@ -19,6 +19,7 @@ include $(TESTBED_SRCDIR)/GNUmakerules
DESTDIR =
ETCDIR = $(DESTDIR)/etc
INSTALL_DIR = $(ETCDIR)/testbed
RC_DIR = $(INSTALL_DIR)/rc.d
ISMFS = $(INSTALL_DIR)/ismfs
INSTALL_FILES = group master.passwd setup
INSTALL = /usr/bin/install -c
......@@ -29,6 +30,7 @@ mfs-install: script-install bin-install
dir-install:
-mkdir -p $(INSTALL_DIR)
-mkdir -p $(RC_DIR)
misc-install: dir-install
-rm -rf $(INSTALL_DIR)/sup/sup
......@@ -72,6 +74,8 @@ script-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp1 $(ETCDIR)/start_if.fxp1
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp4 $(ETCDIR)/start_if.fxp4
$(INSTALL) -m 755 $(SRCDIR)/start_if.xl0 $(ETCDIR)/start_if.xl0
$(INSTALL) -m 755 $(SRCDIR)/rc.conf $(ETCDIR)/rc.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_fxp0.conf $(INSTALL_DIR)/gated_fxp0.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_fxp1.conf $(INSTALL_DIR)/gated_fxp1.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_fxp4.conf $(INSTALL_DIR)/gated_fxp4.conf
$(INSTALL) -m 755 $(SRCDIR)/shutdown.sh $(RC_DIR)/shutdown.sh
# -- sysinstall generated deltas -- #
# Created: Wed Jun 13 16:59:03 2001
# Enable network daemons for user convenience.
# This file now contains just the overrides from /etc/defaults/rc.conf
# please make all changes to this file.
sendmail_enable="NO"
sshd_enable="YES"
nfs_client_enable="YES"
xntpd_enable="YES"
ntpdate_enable="YES"
ntpdate_flags="boss.emulab.net"
local_startup="/etc/testbed/rc.d /usr/local/etc/rc.d"
#!/bin/sh
#
# Special shutdown script for testbed nodes
#
case "$1" in
start)
#
# Nothing to do on node startup
#
;;
stop)
#
# Inform the testbed that we're rebooting
#
echo "Informing the testbed we're rebooting"
/etc/testbed/tmcc state REBOOTING
;;
*)
echo "Uknown option $1 - should be 'start' or 'stop'"
;;
esac
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