From ed318258c8675a2ef49343702faea1157a54cd93 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 29 Sep 2010 18:20:17 +0200 Subject: [PATCH] grml-terminalserver-config: use x.x.x.10 as starting IP address range If we have x.x.x.1 as starting range adress provide x.x.x.10 instead so we avoid possible conflicts with default gateway. --- grml-terminalserver-config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grml-terminalserver-config b/grml-terminalserver-config index 8aa0748..b14a7b6 100755 --- a/grml-terminalserver-config +++ b/grml-terminalserver-config @@ -167,6 +167,12 @@ for addresses from 192.168.0.101 to (and including) 192.168.0.200. done IPRANGE_FROM_=`execute "ipcalc -nb $IP_/$NETMASK_" warn |awk '/HostMin/{print $2}'` + # if we have x.x.x.1 as starting range adress provide + # x.x.x.10 instead so we avoid possible conflicts with + # default gateway + if echo $IPFROM | grep -c '\.1$' ; ; then + IPFROM="${IPFROM%%\.1}.10" + fi IPRANGE_TO_=`execute "ipcalc -nb $IP_/$NETMASK_" warn |awk '/HostMax/{print $2}'` NETWORK_=`execute "ipcalc -nb $IP_/$NETMASK_" warn |awk '/Network:/{print $2}'` NETWORK_=${NETWORK_%/*} -- 2.1.4