Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
693a0baa
Commit
693a0baa
authored
Sep 20, 2002
by
Mike Hibler
Browse files
collapse S12testbed and tbshutdown into a single start/stop script
parent
87b9776d
Changes
3
Hide whitespace changes
Inline
Side-by-side
tmcd/linux/GNUmakefile.in
View file @
693a0baa
...
...
@@ -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)/
S12
testbed $(RC_DIR)/
rc3.d/S12
testbed
$(INSTALL) -m 755
$(
S
RCDIR)/
tbshutdown $(RC_DIR)/init.d/tbshutdown
-ln -s $(RC_DIR)/init.d/t
bshutdown
$(RC_DIR)/rc
3
.d/
S13tbshutdown
-ln -s $(RC_DIR)/init.d/t
bshutdown
$(RC_DIR)/rc6.d/K1
3tbshutdown
$(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/t
estbed
$(RC_DIR)/rc
1
.d/
K12testbed
-ln -s $(RC_DIR)/init.d/t
estbed
$(RC_DIR)/rc6.d/K1
2testbed
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
...
...
tmcd/linux/S12testbed
deleted
100755 → 0
View file @
87b9776d
#!/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
tmcd/linux/t
bshutdown
→
tmcd/linux/t
estbed
100755 → 100644
View file @
693a0baa
...
...
@@ -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
=
$?
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment