diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2005-05-23 16:05:53 +0000 |
---|---|---|
committer | John Bowler <jbowler@nslu2-linux.org> | 2005-05-23 16:05:53 +0000 |
commit | 8bc11aeda8d5540d1625fe46725178725e1826c1 (patch) | |
tree | d4428c7729234fce3c60d8e17c7aae6d44ac44bf /packages/portmap | |
parent | 5c0d7c846f43561e6d7a061e1b5194c326ab36e3 (diff) |
Changes to make portmap shutdown happen on openslug
BKrev: 4291ff61BcZ82KNfnhcRu_VCLNBURA
Diffstat (limited to 'packages/portmap')
-rw-r--r-- | packages/portmap/files/portmap.init | 50 | ||||
-rw-r--r-- | packages/portmap/portmap_5-9.bb | 35 |
2 files changed, 85 insertions, 0 deletions
diff --git a/packages/portmap/files/portmap.init b/packages/portmap/files/portmap.init index e69de29bb2..6dac207350 100644 --- a/packages/portmap/files/portmap.init +++ b/packages/portmap/files/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 --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 + diff --git a/packages/portmap/portmap_5-9.bb b/packages/portmap/portmap_5-9.bb index e69de29bb2..8a275a185c 100644 --- a/packages/portmap/portmap_5-9.bb +++ b/packages/portmap/portmap_5-9.bb @@ -0,0 +1,35 @@ +DESCRIPTION = "RPC program number mapper." +SECTION = "console/network" +LICENSE = "GPL" +PR = "r3" + +SRC_URI = "http://www.uk.debian.org/debian/pool/main/p/portmap/portmap_5.orig.tar.gz \ + http://www.uk.debian.org/debian/pool/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \ + file://no-libwrap.patch;patch=1;pnum=0 \ + file://portmap.init \ + file://make.patch;patch=1" +S = "${WORKDIR}/portmap_5beta" + +PACKAGES =+ "portmap-utils" +FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump" +FILES_${PN}-doc += "${docdir}" + +INITSCRIPT_NAME = "portmap" +INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . start 18 2 3 4 5 . stop 81 1 ." +# openslug: need start in S (for nfs) and stop in 0/6 only, allow for NFS root +INITSCRIPT_PARAMS_openslug = "start 43 S . stop 32 0 6 ." + +inherit update-rc.d + +sbindir = "/sbin" + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap + oe_runmake 'docdir=${docdir}/portmap' \ + 'DESTDIR=${D}' install +} |