From 42859848ad81cf0a55d80b6b3a3c9bed550bd6a5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 9 Nov 2009 19:00:57 +0000 Subject: improved openwrt init script 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 "." } -- cgit v0.10.2