From d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 Sep 2010 19:09:11 +0100 Subject: packages: Separate out most of the remaining packages into recipes Signed-off-by: Richard Purdie --- .../portmap/portmap/portmap.init | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 meta/recipes-connectivity/portmap/portmap/portmap.init (limited to 'meta/recipes-connectivity/portmap/portmap') diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init new file mode 100755 index 0000000000..e46513e115 --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap/portmap.init @@ -0,0 +1,59 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: portmap +# Required-Start: $network +# Required-Stop: $network +# Default-Start: S 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: The RPC portmapper +# Description: Portmap is a server that converts RPC (Remote +# Procedure Call) program numbers into DARPA +# protocol port numbers. It must be running in +# order to make RPC calls. Services that use +# RPC include NFS and NIS. +### END INIT INFO + +test -f /sbin/portmap || exit 0 + +case "$1" in + start) + echo "Starting portmap daemon..." + start-stop-daemon --start --quiet --exec /sbin/portmap + + if [ -f /var/run/portmap.upgrade-state ]; then + echo "Restoring old RPC service information..." + sleep 1 # needs a short pause or pmap_set won't work. :( + pmap_set /var/run/portmap.state + $0 stop + $0 start + if [ ! -f /var/run/portmap.upgrade-state ]; then + sleep 1 + pmap_set