port lots of init scripts over to rc.common (more to come)
[openwrt/svn-archive/archive.git] / net / portmap / files / portmap.init
index 31a3399e93c3a023a5f8a6e5c74bd5bd3ea0fc68..fd4be7353534534794281ddfd05d343125e46d9c 100644 (file)
@@ -1,16 +1,15 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
 
 BIN=portmap
 DEFAULT=/etc/default/$BIN
 [ -f $DEFAULT ] && . $DEFAULT
 
-case $1 in
- start)
-  $BIN $OPTIONS
-  ;;
- *)
-  echo "usage: $0 start"
-  exit 1
-esac
+start() {
+       $BIN $OPTIONS
+}
+
+stop() {
+       killall $BIN
+}
 
-exit $?