From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../portmap/portmap/portmap.init | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100755 meta/recipes-connectivity/portmap/portmap/portmap.init (limited to 'meta/recipes-connectivity/portmap/portmap/portmap.init') diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init new file mode 100755 index 0000000000..621aa171ae --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap/portmap.init @@ -0,0 +1,67 @@ +#!/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 [ $do_state -eq 1 ]; then + if [ ! -f /var/run/portmap.upgrade-state ]; then + sleep 1 + pmap_set