type fixes
[grml-terminalserver.git] / grml-terminalserver-config
index 9369465..022aa0c 100755 (executable)
@@ -85,12 +85,12 @@ function writeConfig
 # created on "$date_"
 INTERFACE_="$INTERFACE_"
 IP_="$IP_"
+NETWORK_="$NETWORK_"
 NETMASK_="$NETMASK_"
 GW_="$GW_"
 NAMESERVERS_="$NAMESERVERS_"
 IPRANGE_FROM_="$IPRANGE_FROM_"
 IPRANGE_TO_="$IPRANGE_TO_"
-NETWORK_="$NETWORK_"
 OPTIONS_="$OPTIONS_"
 BOOT_ARGS_="$BOOT_ARGS_"
 
@@ -123,7 +123,7 @@ function actionAutoconf
 function actionMkInitrd
 {
   echo "Creating initrd: $PATH_/minirt26.gz"
-  isExistent "$PATH_/minirt26.gz" && echo "$PATH_/minirt26.gz does allready exist, skipping initrd creation" && return 0
+  isExistent "$PATH_/minirt26.gz" && echo "$PATH_/minirt26.gz does already exist, skipping initrd creation" && return 0
   mkInitrd
   echo 'done'
 }
@@ -151,7 +151,7 @@ function mkInitrd
 
   # implanting my initrd changes into the original initrd
   
-  # copy programs, check if there are allready links with this name to busybox
+  # copy programs, check if there are already links with this name to busybox
   for i in $USR_SHARE_/discover* $USR_SHARE_/udhcpc $USR_SHARE_/udhcp-config.sh $USR_SHARE_/cdir $USR_SHARE_/rdir /usr/bin/ldd ;do
     tmp_name_="${i##*/}"
     isNotExistent "$INITRD_/static/$tmp_name_" eprint || execute "rm $INITRD_/static/$tmp_name_"
@@ -290,9 +290,10 @@ for addresses from 192.168.0.101 to (and including) 192.168.0.200.
       netcardconfig || die "Could not get interface" $?
   done
 
-  IPRANGE_FROM_=`execute "ipcalc -n $IP_/$NETMASK_" warn |awk '/HostMin/{print $2}'`
-  IPRANGE_TO_=`execute "ipcalc -n $IP_/$NETMASK_" warn |awk '/HostMax/{print $2}'`
-  NETWORK_=$IPRANGE_FROM_
+  IPRANGE_FROM_=`execute "ipcalc -nb $IP_/$NETMASK_" warn |awk '/HostMin/{print $2}'`
+  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_%/*}
   local iprange_=""
   while [ -z "$IPRANGE_FROM_" -o -z "$IPRANGE_TO_" -o -z "$iprange_" ]; do
     iprange_="$IPRANGE_FROM_ $IPRANGE_TO_"
@@ -456,7 +457,7 @@ function grubConfigWork
   local grub_title_="Grub configuration"
   local grub_nic_message_="
 Give me the types of network cards you would want to boot from.
-If you networkcard is allready listed press <OK>!
+If you networkcard is already listed press <OK>!
 
 WARNING: DON't add all NIC's, grub could possibly stop working!!"
   local nics_=""
@@ -611,4 +612,4 @@ esac
 removeTmpFiles
 # END OF FILE
 ################################################################################
-# vim:foldmethod=marker
+# vim:foldmethod=marker tabstop=2 expandtab shiftwidth=2