]> Frank Brehm's Git Trees - config/uhu1/etc.git/commitdiff
committing changes in /etc after emerge run
authorfrank <frank@uhu1.uhu-banane.de>
Sat, 28 Jan 2012 21:38:36 +0000 (22:38 +0100)
committerroot <root@uhu1.uhu-banane.de>
Sat, 28 Jan 2012 21:38:36 +0000 (22:38 +0100)
Package changes:
+net-nds/portmap-6.0

.etckeeper
conf.d/portmap [new file with mode: 0644]
init.d/portmap [new file with mode: 0755]

index 89b46af38e9049a45b5b3e13dd396462f1327b9f..3b8caa0140150ef725a5779deda6900a8d81c304 100755 (executable)
@@ -132,6 +132,7 @@ maybe chmod 0644 './conf.d/network'
 maybe chmod 0644 './conf.d/ntp-client'
 maybe chmod 0644 './conf.d/ntpd'
 maybe chmod 0644 './conf.d/pciparm'
+maybe chmod 0644 './conf.d/portmap'
 maybe chmod 0644 './conf.d/pydoc-2.7'
 maybe chmod 0644 './conf.d/pydoc-3.1'
 maybe chmod 0644 './conf.d/rsyncd'
@@ -559,6 +560,7 @@ maybe chmod 0755 './init.d/ntpd'
 maybe chmod 0755 './init.d/numlock'
 maybe chmod 0755 './init.d/pciparm'
 maybe chmod 0755 './init.d/php-fpm'
+maybe chmod 0755 './init.d/portmap'
 maybe chmod 0755 './init.d/procfs'
 maybe chmod 0755 './init.d/pwcheck'
 maybe chmod 0755 './init.d/pydoc-2.7'
diff --git a/conf.d/portmap b/conf.d/portmap
new file mode 100644 (file)
index 0000000..c2756c9
--- /dev/null
@@ -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/init.d/portmap b/init.d/portmap
new file mode 100755 (executable)
index 0000000..bbffd6c
--- /dev/null
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/files/portmap.rc6,v 1.13 2009/05/30 20:50:39 vapier Exp $
+
+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
+}