port lots of init scripts over to rc.common (more to come)
authorFelix Fietkau <nbd@openwrt.org>
Wed, 4 Oct 2006 20:57:49 +0000 (20:57 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 4 Oct 2006 20:57:49 +0000 (20:57 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/olsrd@4917 3c298f89-4303-0410-b956-a3cf2f4a3e73

files/olsrd.init

index 1f1fdb95192f2ddab1536873e0ccf6fe20b31322..f59ff7ef88271ca672dba2c4bea170ade4627e1d 100644 (file)
@@ -1,15 +1,13 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
 
 DEFAULT=/etc/default/olsrd
 [ -f $DEFAULT ] && . $DEFAULT
 
-case $1 in
- start)
-  olsrd $OPTIONS
-  ;;
- *)
-  echo "usage: $0 (start)"
-  exit 1
-esac
+start() {
+       olsrd $OPTIONS
+}
 
-exit $?
+stop() {
+       killall olsrd
+}