[Bug 272337] New: create default fallback config
https://bugzilla.novell.com/show_bug.cgi?id=272337 Summary: create default fallback config Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: System Imaging AssignedTo: ms@novell.com ReportedBy: jigish.gohil@gmail.com QAContact: adrian@novell.com When pxebooting kiwi the client should be able to get the default config if none is found: It can be either as pxeboot does it: /mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc-dd /mybootdir/pxelinux.cfg/C000025B /mybootdir/pxelinux.cfg/C000025 /mybootdir/pxelinux.cfg/C00002 /mybootdir/pxelinux.cfg/C0000 /mybootdir/pxelinux.cfg/C000 /mybootdir/pxelinux.cfg/C00 /mybootdir/pxelinux.cfg/C0 /mybootdir/pxelinux.cfg/C /mybootdir/pxelinux.cfg/default or config.default config.realipaddress (config.10.0.0.2) config.network (config.10.0.0.0) -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ms@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|create default fallback |kiwi: create default fallback config |config | -- 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.
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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ms@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |web@alexanderschaber.de ------- Comment #2 from ms@novell.com 2007-05-09 02:21 MST ------- this looks really good, could you sent a diff ? Thanks a lot -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 web@alexanderschaber.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|web@alexanderschaber.de | ------- Comment #3 from web@alexanderschaber.de 2007-05-09 12:58 MST ------- Created an attachment (id=138758) --> (https://bugzilla.novell.com/attachment.cgi?id=138758&action=view) patch for linuxrc -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ------- Comment #4 from web@alexanderschaber.de 2007-05-09 13:00 MST ------- Created an attachment (id=138759) --> (https://bugzilla.novell.com/attachment.cgi?id=138759&action=view) patch for include -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ------- Comment #5 from ms@novell.com 2007-05-10 10:58 MST ------- I slightly changed your patch, would you mind to have a look at it and give it a test ? Would be great Thanks patches follows: -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ms@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138758|0 |1 is obsolete| | ------- Comment #6 from ms@novell.com 2007-05-10 11:00 MST ------- Created an attachment (id=139090) --> (https://bugzilla.novell.com/attachment.cgi?id=139090&action=view) suse-linuxrc.diff -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ms@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138759|0 |1 is obsolete| | ------- Comment #7 from ms@novell.com 2007-05-10 11:00 MST ------- Created an attachment (id=139091) --> (https://bugzilla.novell.com/attachment.cgi?id=139091&action=view) KIWILinuxRC.sh.diff -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ms@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |web@alexanderschaber.de ------- Comment #8 from ms@novell.com 2007-05-10 11:02 MST ------- I didn't test the patches right now, would be great if you could check it. Thanks again -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=272337 ms@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Info Provider|web@alexanderschaber.de | Resolution| |FIXED ------- Comment #9 from ms@novell.com 2007-05-11 04:28 MST ------- tested, and works for me. fixed Thanks -- 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.
participants (1)
-
bugzilla_noreply@novell.com