fixed grub compile problem
[grml-terminalserver.git] / grml-terminalserver-config
index 9369465..a65edcb 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_"
@@ -373,8 +374,10 @@ Quite usefull examples:
 ssh=<pw>              - Start ssh server and set password of user grml to pw
 services=<1,2,3>      - Execute /etc/init.d/{1,2,3} start
 console=ttyS0,9600n8  - Initialise seriell console
-
+secure                - Boot only restricted clients (without root permissions)
+startx                - Boot into X (should be used with secure)
  
+
 "
   $DIALOG_ --clear --no-collapse --backtitle "$BACK_TITLE_" --title "$OPTIONS_TITLE_" --inputbox "$OPTIONS_BOOTARG_MESSAGE_" 0 0\
     2>$TMP_ || die "problems getting additional boot arguments"
@@ -456,7 +459,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_=""
@@ -498,7 +501,7 @@ title Load config from Tftp server
   configfile (nd)/menu.lst
 EOT
   #execute "./configure --enable-diskless --enable-preset-menu=./preset-menu $cmd_line_" warn || read
-  execute "./configure --enable-preset-menu=./preset-menu $cmd_line_" warn || read
+  execute "CC=gcc-3.3 ./configure --enable-preset-menu=./preset-menu $cmd_line_" warn || read
   execute "make -j2 CC=gcc-3.3" warn || read #return 1
 
   local st1_="stage1/stage1"
@@ -611,4 +614,4 @@ esac
 removeTmpFiles
 # END OF FILE
 ################################################################################
-# vim:foldmethod=marker
+# vim:foldmethod=marker tabstop=2 expandtab shiftwidth=2