X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F37-portmap;h=d7a426c29c910194364aa223a9ad5cfb2fddf970;hp=017d7d25b36c16b27d7011f09c9fe5ba682dd04b;hb=40b0557155a1203823d820af0b7bef21af037cd2;hpb=4b2e8632eba4fa2343986f897cfcd59ed1413d66 diff --git a/etc/grml/fai/config/scripts/GRMLBASE/37-portmap b/etc/grml/fai/config/scripts/GRMLBASE/37-portmap index 017d7d2..d7a426c 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/37-portmap +++ b/etc/grml/fai/config/scripts/GRMLBASE/37-portmap @@ -1,5 +1,5 @@ #!/bin/bash -# Filename: /etc/grml/fai/config/scripts/GRMLBASE/37-portmap +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/37-portmap # Purpose: configure portmap of live-system # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ @@ -9,14 +9,12 @@ set -u set -e -[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf -[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local - # Work around a bug in the portmap package, see # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=317358 CONFFILE="$target/etc/default/portmap" +# modify only if the file is present, nowadays we have rpcbind if [ -r "$CONFFILE" ] ; then # modify it iff we have portmap's default configuration if grep -q '^OPTIONS="-i 127.0.0.1"' "$CONFFILE" ; then @@ -25,22 +23,7 @@ if [ -r "$CONFFILE" ] ; then printf "Removing loopback-interface-only option (workaround #317358) in /etc/default/portmap: " sed -i 's/^OPTIONS.*/# OPTIONS="-i 127.0.0.1"/' "$CONFFILE" && echo OK || echo ERROR fi -else # no /etc/default/portmap available yet: - printf "Building fresh /etc/default/portmap configuration file." - cat > "$CONFFILE" << EOF -# Portmap configuration file -# -# Note: if you manually edit this configuration file, -# portmap configuration scripts will avoid modifying it -# (for example, by running 'dpkg-reconfigure portmap'). - -# If you want portmap to listen only to the loopback -# interface, uncomment the following line (it will be -# uncommented automatically if you configure this -# through debconf). -# OPTIONS="-i 127.0.0.1" -EOF fi ## END OF FILE ################################################################# -# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2