summaryrefslogtreecommitdiff
path: root/openwrt
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
parent68d3b7892deb793f2d911bf825fb3e6116267c24 (diff)
improved openwrt init script
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/rhctl/Makefile2
-rwxr-xr-xopenwrt/rhctl/files/switchctl.init10
2 files changed, 9 insertions, 3 deletions
diff --git a/openwrt/rhctl/Makefile b/openwrt/rhctl/Makefile
index 051a0ca..c5e7fca 100644
--- a/openwrt/rhctl/Makefile
+++ b/openwrt/rhctl/Makefile
@@ -18,7 +18,7 @@ PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://localhost/
-PKG_MD5SUM:=72255c3437630155453616ba18d8fb25
+PKG_MD5SUM:=1336f063117440c040663025110bf612
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
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 "."
}