summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rc.proto33
-rwxr-xr-xrc.single16
2 files changed, 14 insertions, 35 deletions
diff --git a/rc.proto b/rc.proto
deleted file mode 100644
index 3bf45e3..0000000
--- a/rc.proto
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
- start)
- stat_busy "Starting Daemon"
- /usr/sbin/daemon
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon daemon
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping Daemon"
- killall -q daemon
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon daemon
- stat_done
- fi
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
diff --git a/rc.single b/rc.single
index fab12ff..804cda6 100755
--- a/rc.single
+++ b/rc.single
@@ -8,12 +8,24 @@
if [ "$PREVLEVEL" = "2" ]; then
# Shutdown daemons
- stat_busy "Shutting Down Daemons"
- stat_done
+ if [ -d /var/run/daemons ]; then
+ for daemon in `ls /var/run/daemons`; do
+ /etc/rc.d/$daemon stop
+ done
+ fi
# Shutdown network
stat_busy "Shutting Down Network"
+ /sbin/ifconfig lo down
+ if [ "$IPADDR" != "" -a "$NETMASK" != "" ]; then
+ /sbin/ifconfig eth0 down
+ fi
stat_done
+
+ # Shutdown pcmcia
+ if [ "$PCMCIA" = "yes" -a -f /etc/rc.d/pcmcia ]; then
+ /etc/rc.d/pcmcia stop
+ fi
fi
if [ "$PREVLEVEL" != "N" ]; then