From: Ulrich Dangel Date: Sun, 15 May 2011 22:08:29 +0000 (+0200) Subject: Support either portmap or rpcbind in grml-terminalserver. X-Git-Tag: v0.99.13~1 X-Git-Url: http://git.grml.org/?p=grml-terminalserver.git;a=commitdiff_plain;h=eb79aa48bb12bc3706d96454b2a181634e63acef Support either portmap or rpcbind in grml-terminalserver. In the upcoming Grml version 2011.05 /etc/init.d/portmap does not exist but /etc/init.d/rpcbind. This patch supports either /etc/init.d/portmap or /etc/init.d/rpcbind. --- diff --git a/grml-terminalserver b/grml-terminalserver index d736a8c..b8328e8 100755 --- a/grml-terminalserver +++ b/grml-terminalserver @@ -66,8 +66,13 @@ EOT function killPortmapper { + if [ -f /etc/init.d/portmap ] ; then /etc/init.d/portmap stop >/dev/null &>/dev/null - killall -9 portmap &>/dev/null + elif [ -f /etc/init.d/rpcbind ] ; then + /etc/init.d/rpcbind stop >/dev/null &>/dev/null + fi + killall -9 portmap &>/dev/null + killall -9 rpcbind &>/dev/null } # DHCP SERVICE {{{ @@ -250,7 +255,13 @@ function removeNfsConfig function startNfs { - /etc/init.d/portmap start + if [ -f /etc/init.d/portmap ] ; then + /etc/init.d/portmap start + elif [ -f /etc/init.d/rpcbind ] ; then + /etc/init.d/rpcbind start + else + echo "Warning: Could not start portmapper/rpcbind" >&2 + fi /etc/init.d/nfs-common start # FIXME /etc/init.d/nfs-kernel-server start $USR_SHARE_/nfs-kernel-server start