Commit 8666067e authored by Mike Hibler's avatar Mike Hibler

Deal with the 9 billion names of start/stop in BSD boot scripts.

parent 587c72ea
#!/bin/sh
#
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -27,10 +27,10 @@
# Boottime initialization of the control node (aka ops, users, etc).
#
case "$1" in
start)
start|faststart|quietstart|onestart|forcestart)
$BINDIR/rc/rc.ctrlnode -b boot
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
$BINDIR/rc/rc.ctrlnode shutdown
;;
*)
......
......@@ -6,10 +6,10 @@
# KEYWORD: shutdown
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
/sbin/ldconfig -m /usr/local/lib/mysql
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
;;
*)
echo ""
......
......@@ -17,13 +17,13 @@ else
fi
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
if [ -x $safeprog ]; then
$safeprog --pid-file=/var/db/mysql/mysqld.pid --user=mysql --log-long-format --log=@prefix@/log/mysql/base --log-bin=@prefix@/log/mysql/update --log-slow-queries=@prefix@/log/mysql/slowqueries -O max_connections=300 -O long_query_time=2 -O key_buffer=32M -O table_cache=256 -O sort_buffer=4M -O record_buffer=1M > /dev/null 2>&1 &
echo -n ' mysqld'
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
/usr/bin/killall mysqld > /dev/null 2>&1 && echo -n ' mysqld'
;;
*)
......
#!/bin/sh
case "$1" in
start)
start|faststart|quietstart|onestart|forcestart)
if [ -x /usr/local/sbin/named ]; then
sleep 1
/usr/local/sbin/named -c /etc/namedb/named.conf
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
/usr/bin/killall named > /dev/null 2>&1 && echo -n ' named'
;;
*)
......
......@@ -6,7 +6,7 @@ elabinelab="@ELABINELAB@"
configfile="/usr/local/etc/dhcpd.conf"
extraifs="@DHCPD_EXTRAIFS@"
case "$1" in
start)
start|faststart|quietstart|onestart|forcestart)
# limit to control network
cnetif=
if [ $elabinelab != "1" -a -x @prefix@/sbin/findif ]; then
......@@ -18,7 +18,7 @@ case "$1" in
/usr/local/sbin/dhcpd -f $cnetif $extraifs -cf $configfile
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
if [ -r /var/run/dhcpd_wrapper.pid ]; then
kill `cat /var/run/dhcpd_wrapper.pid`
fi
......
......@@ -21,7 +21,7 @@ fi
options="--pid-file=/var/db/mysql/mysqld.pid --skip-grant-tables --skip-networking --user=mysql --log-long-format --log=@prefix@/log/mysql/base --log-bin=@prefix@/log/mysql/update --log-slow-queries=@prefix@/log/mysql/slowqueries -O max_connections=500 -O long_query_time=2 -O key_buffer=32M -O table_cache=256 -O sort_buffer=4M -O record_buffer=1M"
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
if [ -x $safeprog ]; then
if [ "$fbsdvers" = "FreeBSD6" -o $isvers5 -eq 1 ]; then
#
......@@ -37,7 +37,7 @@ case "$1" in
echo -n ' mysqld'
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
/usr/bin/killall mysqld > /dev/null 2>&1 && echo -n ' mysqld'
;;
*)
......
......@@ -14,7 +14,7 @@ DBNAME="@TBDBNAME@"
LOGFILE="/var/log/mysqlcheck.log"
case "$1" in
start)
start|faststart|quietstart|onestart|forcestart)
rm -f $LOGFILE
if [ $MAINSITE == "0" ]; then
echo "*** Checking $DBNAME ..." >> $LOGFILE
......@@ -29,7 +29,7 @@ case "$1" in
mysqlcheck --auto-repair geni-cm >> $LOGFILE
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
;;
*)
echo ""
......
......@@ -38,9 +38,9 @@ if [ ! -x $bindir/mfrisbeed ]; then
fi
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
;;
restart)
restart|fastrestart|quietrestart|onerestart|forcerestart)
if [ -f /var/run/mfrisbeed_wrapper.pid ]; then
kill `cat /var/run/mfrisbeed_wrapper.pid` >/dev/null 2>&1
rm -f /var/run/mfrisbeed_wrapper.pid
......@@ -50,7 +50,7 @@ restart)
rm -f /var/run/mfrisbeed.pid
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
echo -n ' mfrisbeed'
if [ -f /var/run/mfrisbeed_wrapper.pid ]; then
kill `cat /var/run/mfrisbeed_wrapper.pid` >/dev/null 2>&1
......
......@@ -26,9 +26,9 @@ if [ ! -x $bindir/mfrisbeed ]; then
fi
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
;;
restart)
restart|fastrestart|quietrestart|onerestart|forcerestart)
if [ -f /var/run/mfrisbeed_wrapper.pid ]; then
kill `cat /var/run/mfrisbeed_wrapper.pid` >/dev/null 2>&1
rm -f /var/run/mfrisbeed_wrapper.pid
......@@ -38,7 +38,7 @@ restart)
rm -f /var/run/mfrisbeed.pid
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
echo -n ' mfrisbeed'
if [ -f /var/run/mfrisbeed_wrapper.pid ]; then
kill `cat /var/run/mfrisbeed_wrapper.pid` >/dev/null 2>&1
......
......@@ -9,7 +9,7 @@
# KEYWORD: shutdown
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
#
# See if the testbed is "shutdown"; The variable has three values.
# 0 - Testbed is enabled.
......@@ -142,7 +142,7 @@ case "$1" in
fi
fi
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
if [ -r /var/run/bootinfo.pid ]; then
kill `cat /var/run/bootinfo.pid`
fi
......
......@@ -6,7 +6,7 @@
# KEYWORD: shutdown
#
# Copyright (c) 2012 University of Utah and the Flux Group.
# Copyright (c) 2012-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -70,15 +70,15 @@ fi
# fail and so will we.
#
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
echo "Setting up static ARP entries."
$BINDIR/fixarpinfo -sv -t $timo >$LOGDIR/fixarpinfo.log 2>&1
;;
restart)
restart|fastrestart|quietrestart|onerestart|forcerestart)
echo "Updating static ARP entries."
$BINDIR/fixarpinfo -uv -t $timo >$LOGDIR/fixarpinfo.log 2>&1
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
echo "Removing static ARP entries."
$BINDIR/fixarpinfo -cv -t $timo >$LOGDIR/fixarpinfo.log 2>&1
;;
......
......@@ -6,7 +6,7 @@
# KEYWORD: shutdown
#
# Copyright (c) 2012 University of Utah and the Flux Group.
# Copyright (c) 2012-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -57,15 +57,15 @@ fi
# we start firing up daemons.
#
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
echo "Setting up static ARP entries."
$BINDIR/fixarpinfo -sv -t $timo >$LOGDIR/fixarpinfo.log 2>&1
;;
restart)
restart|fastrestart|quietrestart|onerestart|forcerestart)
echo "Updating static ARP entries."
$BINDIR/fixarpinfo -uv -t $timo >$LOGDIR/fixarpinfo.log 2>&1
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
echo "Removing static ARP entries."
$BINDIR/fixarpinfo -cv -t $timo >$LOGDIR/fixarpinfo.log 2>&1
;;
......
......@@ -27,12 +27,12 @@ if [ ! -x $bindir/capture ]; then
fi
case "$1" in
start|faststart)
start|faststart|quietstart|onestart|forcestart)
;;
restart)
restart|fastrestart|quietrestart|onerestart|forcerestart)
killall capture
;;
stop)
stop|faststop|quietstop|onestop|forcestop)
killall capture && echo -n ' capture'
exit 0
;;
......
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