summaryrefslogtreecommitdiff
path: root/openwrt/rhctl/files/switchctl.init
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-09 19:00:57 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-09 19:00:57 (GMT)
commit42859848ad81cf0a55d80b6b3a3c9bed550bd6a5 (patch)
treeb7cbb54d7070615a00d93607adadbb7a1cb376bd /openwrt/rhctl/files/switchctl.init
parent68d3b7892deb793f2d911bf825fb3e6116267c24 (diff)
improved openwrt init script
Diffstat (limited to 'openwrt/rhctl/files/switchctl.init')
-rwxr-xr-xopenwrt/rhctl/files/switchctl.init10
1 files changed, 8 insertions, 2 deletions
diff --git a/openwrt/rhctl/files/switchctl.init b/openwrt/rhctl/files/switchctl.init
index c463f40..8ebe46f 100755
--- a/openwrt/rhctl/files/switchctl.init
+++ b/openwrt/rhctl/files/switchctl.init
@@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common
-START=50
+START=70
BIN=switchctl
DAEMON=/usr/bin/$BIN
@@ -11,6 +11,11 @@ start() {
echo -n "Starting $DESC:"
mkdir -p $RUN_D
$DAEMON --write-pid $PIDFILE
+ if [ $? -ne 0 ]; then
+ echo -n " Error"
+ else
+ echo -n " Ok"
+ fi
echo "."
}
@@ -19,8 +24,9 @@ stop() {
if [ -f $PIDFILE ]; then
kill `cat $PIDFILE` > /dev/null 2>&1
rm -f $PIDFILE > /dev/null 2>&1
+ echo -n " Ok"
else
- echo -n "not running"
+ echo -n " not running"
fi
echo "."
}