https://bugzilla.novell.com/show_bug.cgi?id=272337 web@alexanderschaber.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |web@alexanderschaber.de ------- Comment #1 from web@alexanderschaber.de 2007-05-08 12:06 MST ------- #====================================== # 7) Load configuration #-------------------------------------- if [ $LOCAL_BOOT = "no" ];then CONFIG=/etc/config.netclient while true;do # Check config.MAC result=`atftp -g \ -r KIWI/config.$DHCPCHADDR -l $CONFIG $TSERVER 2>&1 | head -n 1` checkTFTPresponse "$result" if test "$cont" = "false";then break elif test "$cont" = "true";then continue fi # Check IP in Hex (pxelinux style) localip=`ip -f inet a s eth0 | tail -n 1 | cut -f6 -d' ' | cut -f1 -d'/'` hexip1=`echo $localip | cut -f1 -d'.'` hexip2=`echo $localip | cut -f2 -d'.'` hexip3=`echo $localip | cut -f3 -d'.'` hexip4=`echo $localip | cut -f4 -d'.'` hexip=`printf "%02X" $hexip1 $hexip2 $hexip3 $hexip4` STEP=8 while [ $STEP -gt 0 ]; do hexippart=`echo $hexip | cut -b -$STEP` result=`atftp -g \ -r KIWI/config.$hexippart -l $CONFIG $TSERVER 2>&1 | head -n 1` checkTFTPresponse "$result" if test "$cont" = "false";then break fi let STEP=STEP-1 done if test "$cont" = "false";then break elif test "$cont" = "true";then continue fi # Check default config result=`atftp -g \ -r KIWI/config.default -l $CONFIG $TSERVER 2>&1 | head -n 1` checkTFTPresponse "$result" if test "$cont" = "false";then break fi done I've moved the tftpresponse check to a function in include : #====================================== # checkTFTPresponse #-------------------------------------- function checkTFTPresponse { # /.../ # check the kernel commandline parameter kiwitftp. # If it exists its contents will be used as tftp # server address stored in the TSERVER variabe # ---- status1=`echo $1 | cut -f2 -d" "` status2=`echo $1 | cut -f6,7 -d" "` if test "$status1" = "unknown";then Echo -n "TFTP Server unknown, enter IP: " && read TSERVER cont=true elif test "$status2" = "<Access violation>";then Echo -n "TFTP access violation, enter IP: " && read TSERVER cont=true else cont=false fi if test -z $TSERVER;then TSERVER=$DHCPSIADDR fi } To see the pxelinux style work: http://pastebin.ca/477502 If this proposal is worthwhile, I'll gladly upload a patch .. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.