summaryrefslogtreecommitdiff
path: root/portmap/portmap.init
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
committerChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
commitf96441b9faf769c9ecdd4d338b605ea3d0cc4010 (patch)
treeedb17ec2c4ea13c5acb1c7350957a249a820e28d /portmap/portmap.init
parentb6588aa6851fb220cedc387d21c51513ef8d67f4 (diff)
Disable bk EOLN_NATIVE conversions on all files in packages FILESPATHs, to prevent it screwing up patches.
BKrev: 4190111fA4MuVozAqwE7xOSL9fr-TA
Diffstat (limited to 'portmap/portmap.init')
-rw-r--r--portmap/portmap.init50
1 files changed, 50 insertions, 0 deletions
diff --git a/portmap/portmap.init b/portmap/portmap.init
index e69de29bb2..3c05b8c2a3 100644
--- a/portmap/portmap.init
+++ b/portmap/portmap.init
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# start/stop portmap daemon.
+
+test -f /sbin/portmap || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting portmap daemon:"
+ echo -n " portmap"
+ start-stop-daemon --start --quiet --exec /sbin/portmap
+ echo "."
+
+ if [ -f /var/run/portmap.upgrade-state ]; then
+ echo -n "Restoring old RPC service information..."
+ sleep 1 # needs a short pause or pmap_set won't work. :(
+ pmap_set </var/run/portmap.upgrade-state
+ rm -f /var/run/portmap.upgrade-state
+ echo "done."
+ fi
+
+ ;;
+ stop)
+ echo -n "Stopping portmap daemon:"
+ echo -n " portmap" ; start-stop-daemon --stop --quiet --oknodo --exec /sbin/portmap
+ echo "."
+ ;;
+ reload)
+ ;;
+ force-reload)
+ $0 restart
+ ;;
+ restart)
+ pmap_dump >/var/run/portmap.state
+ $0 stop
+ $0 start
+ if [ ! -f /var/run/portmap.upgrade-state ]; then
+ sleep 1
+ pmap_set </var/run/portmap.state
+ fi
+ rm -f /var/run/portmap.state
+ ;;
+ *)
+ echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
+