diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-nds/portmap/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-nds/portmap/files')
-rw-r--r-- | net-nds/portmap/files/portmap-6.0-tcpd.patch | 18 | ||||
-rw-r--r-- | net-nds/portmap/files/portmap.confd | 5 | ||||
-rw-r--r-- | net-nds/portmap/files/portmap.rc6 | 58 |
3 files changed, 81 insertions, 0 deletions
diff --git a/net-nds/portmap/files/portmap-6.0-tcpd.patch b/net-nds/portmap/files/portmap-6.0-tcpd.patch new file mode 100644 index 000000000000..c6af8f8c80b4 --- /dev/null +++ b/net-nds/portmap/files/portmap-6.0-tcpd.patch @@ -0,0 +1,18 @@ +Enable compile without tcp-wrappers + +Patch by Timothy Redaelli <drizzt@gentoo.org> + +http://bugs.gentoo.org/178242 + +--- portmap_6.0/pmap_check.c ++++ portmap_6.0/pmap_check.c +@@ -44,7 +44,9 @@ + #include <netinet/in.h> + #include <rpc/rpcent.h> + #endif ++#ifdef HOSTS_ACCESS + #include <tcpd.h> ++#endif + #include <arpa/inet.h> + #include <grp.h> + diff --git a/net-nds/portmap/files/portmap.confd b/net-nds/portmap/files/portmap.confd new file mode 100644 index 000000000000..c2756c992b4a --- /dev/null +++ b/net-nds/portmap/files/portmap.confd @@ -0,0 +1,5 @@ +# /etc/conf.d/portmap: config file for /etc/init.d/portmap + +# Options for `portmap`. +# For a full list, just run `portmap -h`. +#PORTMAP_OPTS="-l" diff --git a/net-nds/portmap/files/portmap.rc6 b/net-nds/portmap/files/portmap.rc6 new file mode 100644 index 000000000000..e123f3df1e6f --- /dev/null +++ b/net-nds/portmap/files/portmap.rc6 @@ -0,0 +1,58 @@ +#!/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 +} |