X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-terminalserver-config;h=50000b65f63d3431a8d0900deef756a76b89c7ac;hb=393501a913872e87da98e57e33bc3d7bba8128a6;hp=698da5ab954a91f4afec0a133d6b4703be29f5de;hpb=41c1fa7d4cc7a3ba42942a142b1b4520161a4b41;p=grml-terminalserver.git diff --git a/grml-terminalserver-config b/grml-terminalserver-config index 698da5a..50000b6 100755 --- a/grml-terminalserver-config +++ b/grml-terminalserver-config @@ -117,11 +117,11 @@ function actionAutoconf # INITRD {{{ function actionMkInitrd { - echo "Installing initrd $PATH_/minirt26.gz:" + echo "Installing initrd $PATH_/initrd.img:" # until we have a stable file location API let's use # an according heuristic initrd_=initrd.img-"$(uname -r)" - cp /boot/"$initrd_" "$PATH_"/minirt26.gz || die "Could not copy /boot/$initrd_" + cp /boot/"$initrd_" "$PATH_"/initrd.img || die "Could not copy /boot/$initrd_" } # }}} @@ -194,8 +194,8 @@ for addresses from 192.168.0.101 to (and including) 192.168.0.200. NAMESERVERS_=`netGetNameservers warn` GW_=`netGetDefaultGateway warn` - GW_DEV_=`/sbin/ip route get "$GW_" | awk '{ print $3; exit; }'` - if [ "$GW_DEV_" != "$INTERFACE_" ] && [ "$GW_DEV_" != "" ]; then + GW_DEV_=`/sbin/ip route get "$GW_" | sed 's/^local //' | awk '{ print $3; exit; }'` + if [ "$GW_DEV_" != "$INTERFACE_" ] && [ "$GW_DEV_" != "" ] && [ "$GW_DEV_" != "lo" ]; then # GW_DEV_ of server is not the same device as the one serviced by dhcpd # so it doesn't make sense to provide the GW_ address to the clients local do_nat_="YES" @@ -222,7 +222,7 @@ the internet?" echo -n "" >"$TMP_" local OPTIONS_BOOTARG_MESSAGE_="Here you can add additional boot arguments for the clients seperated by spaces: -Quite usefull examples: +Quite useful examples: ssh= - Start ssh server and set password of user grml to pw services=<1,2,3> - Execute /etc/init.d/{1,2,3} start @@ -248,7 +248,7 @@ function removeTmpFiles function actionClean { - for i in dhcpd.conf minirt26.gz; do + for i in dhcpd.conf initrd.img; do execute "rm -f $PATH_/$i*" done @@ -289,18 +289,6 @@ setExitFunction 'removeTmpFiles' . $DEFAULT_CONFIG_ . $CONFIG_ -# used config vars: -# MODULES_PATH_ -# MODULES_PATH_ROOT_DIFF_ -# KERNEL_VERSION_ -# ORIGINAL_INITRD_ -if [[ $MODULES_PATH_ == "" || $KERNEL_VERSION_ == "" || $ORIGINAL_INITRD_ == "" ]]; then - warn "MODULES_PATH_=\"$MODULES_PATH_\" \ -KERNEL_VERSION_=\"$KERNEL_VERSION_\" \ -ORIGINAL_INITRD_=\"$ORIGINAL_INITRD_\"" - die "False configuration, please update $CONFIG_" -fi - case "$1" in interactive) actionInteractive ;;