Commit 693a0baa authored by Mike Hibler's avatar Mike Hibler

collapse S12testbed and tbshutdown into a single start/stop script

parent 87b9776d
......@@ -86,18 +86,18 @@ script-install: dir-install
$(INSTALL_DIR)/gated_eth2.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_eth4.conf \
$(INSTALL_DIR)/gated_eth4.conf
$(INSTALL) -m 755 $(SRCDIR)/S12testbed $(RC_DIR)/rc3.d/S12testbed
$(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(RC_DIR)/init.d/tbshutdown
-ln -s $(RC_DIR)/init.d/tbshutdown $(RC_DIR)/rc3.d/S13tbshutdown
-ln -s $(RC_DIR)/init.d/tbshutdown $(RC_DIR)/rc6.d/K13tbshutdown
$(INSTALL) -m 755 $(SRCDIR)/testbed $(RC_DIR)/init.d/testbed
-ln -s $(RC_DIR)/init.d/testbed $(RC_DIR)/rc3.d/S12testbed
-ln -s $(RC_DIR)/init.d/testbed $(RC_DIR)/rc1.d/K12testbed
-ln -s $(RC_DIR)/init.d/testbed $(RC_DIR)/rc6.d/K12testbed
sfs-install:
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/etc/sfs
$(INSTALL) -m 755 $(SRCDIR)/sfs.sh $(RC_DIR)/init.d/sfs.sh
$(INSTALL) -m 755 $(SRCDIR)/sfs.sh $(RC_DIR)/init.d/sfs
-ln -s $(RC_DIR)/init.d/nfs $(RC_DIR)/rc3.d/S20nfs
-ln -s $(RC_DIR)/init.d/sfs.sh $(RC_DIR)/rc3.d/S50sfs
-ln -s $(RC_DIR)/init.d/sfs.sh $(RC_DIR)/rc3.d/K19sfs
-ln -s $(RC_DIR)/init.d/sfs.sh $(RC_DIR)/rc6.d/K19sfs
-ln -s $(RC_DIR)/init.d/sfs $(RC_DIR)/rc3.d/S50sfs
-ln -s $(RC_DIR)/init.d/sfs $(RC_DIR)/rc3.d/K19sfs
-ln -s $(RC_DIR)/init.d/sfs $(RC_DIR)/rc6.d/K19sfs
$(INSTALL) -m 644 $(SRCDIR)/exports $(ETCDIR)/exports
$(INSTALL) -m 644 $(SRCDIR)/sfsrwsd_config $(ETCDIR)/sfs/sfsrwsd_config
$(INSTALL) -m 644 $(SRCDIR)/sfssd_config $(ETCDIR)/sfs/sfssd_config
......
#!/bin/bash
#
# testbed Do some testbed stuff,
#
# description: Installs deltas and reboots.
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
if [ ! -f /etc/sysconfig/network ]; then
exit 0
fi
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
RETVAL=0
# See how we were called.
case "$1" in
start)
if [ -r /etc/rc.d/testbed/rc.delta ]; then
echo "Doing Testbed Delta Thing ..."
/etc/rc.d/testbed/rc.delta
RETVAL=$?
fi
;;
stop)
echo "Done"
;;
status)
echo "Peachy"
;;
restart)
echo "Done"
;;
reload)
echo "Done"
;;
*)
echo "Usage: testbed {start|stop|restart|reload|status}"
exit 1
esac
exit $RETVAL
......@@ -6,8 +6,11 @@
#
#
# testbed-shutdown - On shutdown, inform the testbed that we're going down
# testbed Do some testbed stuff,
#
# description: Installs deltas (forcing reboot if necessary).
# On shutdown, it informs the testbed we are rebooting
# and terminates any lingering daemons.
# Source function library.
. /etc/rc.d/init.d/functions
......@@ -27,11 +30,20 @@ RETVAL=0
# See how we were called.
case "$1" in
start)
touch /var/lock/subsys/tbshutdown
echo "Done"
if [ -r /etc/rc.d/testbed/rc.delta ]; then
echo "Doing Testbed Delta Thing ..."
/etc/rc.d/testbed/rc.delta
RETVAL=$?
fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/testbed
;;
stop)
rm /var/lock/subsys/tbshutdown
rm /var/lock/subsys/testbed
echo "Shutting down testbed daemons ..."
killproc trafgen
killproc program-agent
killproc slothd
killproc healthd
echo "Informing the testbed we're rebooting ..."
/etc/rc.d/testbed/tmcc state REBOOTING
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