2 # Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/37-portmap
3 # Purpose: configure portmap of live-system
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2 or any later version.
7 ################################################################################
12 [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
13 [ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
15 # Work around a bug in the portmap package, see
16 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=317358
18 CONFFILE="$target/etc/default/portmap"
20 # modify only if the file is present, nowadays we have rpcbind
21 if [ -r "$CONFFILE" ] ; then
22 # modify it iff we have portmap's default configuration
23 if grep -q '^OPTIONS="-i 127.0.0.1"' "$CONFFILE" ; then
24 # disable the "-i 127.0.0.1" configuration so it works e.g. with
25 # grml-terminalserver OOTB:
26 printf "Removing loopback-interface-only option (workaround #317358) in /etc/default/portmap: "
27 sed -i 's/^OPTIONS.*/# OPTIONS="-i 127.0.0.1"/' "$CONFFILE" && echo OK || echo ERROR
31 ## END OF FILE #################################################################
32 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2