diff options
Diffstat (limited to 'net-nds/portmap/files/portmap.rc6')
-rw-r--r-- | net-nds/portmap/files/portmap.rc6 | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/net-nds/portmap/files/portmap.rc6 b/net-nds/portmap/files/portmap.rc6 deleted file mode 100644 index e123f3df1e6f..000000000000 --- a/net-nds/portmap/files/portmap.rc6 +++ /dev/null @@ -1,58 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -depend() { - use net - before inetd - before xinetd -} - -checkconfig() { - if [ -e /proc/config.gz ] ; then - if zcat /proc/config.gz | grep -s SUNRPC_REGISTER_V4=y ; then - eerror "portmap does not work with SUNRPC_REGISTER_V4=y;" - eerror "disable it or use the net-nds/rpcbind package." - return 1 - fi - fi - return 0 -} - -start() { - checkconfig || return 1 - - ebegin "Starting portmap" - start-stop-daemon --start --quiet --exec /sbin/portmap -- ${PORTMAP_OPTS} - local ret=$? - eend ${ret} - # without, if a service depending on portmap is started too fast, - # connecting to portmap will fail -- azarah - sleep 1 - return ${ret} -} - -stop() { - ebegin "Stopping portmap" - start-stop-daemon --stop --quiet --exec /sbin/portmap - eend $? -} - -restart() { - # Dump the portmapper's table before stopping - ebegin "Saving portmap table" - local pmap=$(pmap_dump) - eend $? - - # Stop and restart portmapper - svc_stop - sleep 1 - svc_start - - # Reload the portmapper's table - if [ -n "${pmap}" ] ; then - ebegin "Reloading portmap table" - echo "${pmap}" | pmap_set - eend $? - fi -} |