summaryrefslogtreecommitdiffstats
path: root/package/portmap/init-portmap
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 00:55:25 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 00:55:25 +0000
commit2f2492f7f193885bb13f13805e2f703474018b95 (patch)
tree049736e190342ed008441efdcf68f6b7c5b1d472 /package/portmap/init-portmap
parentba46d6ef76fee525001aebec7ae78f6dbd89ac23 (diff)
downloadbuildroot-novena-2f2492f7f193885bb13f13805e2f703474018b95.tar.gz
buildroot-novena-2f2492f7f193885bb13f13805e2f703474018b95.zip
Update packages to provide properly working initialization scripts. These have been tested with embedded PowerPC systems.
Diffstat (limited to 'package/portmap/init-portmap')
-rwxr-xr-xpackage/portmap/init-portmap44
1 files changed, 44 insertions, 0 deletions
diff --git a/package/portmap/init-portmap b/package/portmap/init-portmap
new file mode 100755
index 000000000..573a16abf
--- /dev/null
+++ b/package/portmap/init-portmap
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+[ -f /sbin/portmap ] || exit 0
+
+start() {
+ echo -n "Starting portmap: "
+ portmap
+ mkdir -p /var/lock/subsys
+ touch /var/lock/subsys/portmap
+ echo "done"
+}
+
+
+stop() {
+ echo -n "Stopping portmap: "
+ echo
+ killall portmap
+ rm -rf /var/lock/subsys
+ echo "done"
+}
+
+restart() {
+ stop
+ start
+ rm -f /var/run/portmap.state
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|reload|restart}"
+ exit 1
+esac
+
+exit $?