[Udpcast] Creating files within dhcp.script

Jens Breuer breuer.jens at googlemail.com
Sun Oct 11 20:34:20 CEST 2009


Hello List,
hello Alain,

we finally tracked down the problem.

If dhcp is set to yes in the udpc.config and udpcdialog detects that
the "ip" environment variable (set by pxelinux) is set, it will use
the extracted IP together with the hardcoded interface name "eth0".
Since eth0 hasn't got link in my testsetup ifconfig will fail and
udpcdialog presents the error message described in my previous posts.

A workaround is to introduce an new config option where one can set
the interface to use.
The patch is added as an attachment (patch #04) of this email. Maybe
you and others find it useful and maybe you could include it in the
next version of udpcast (udpcdialog).
The config option is called "defNic" and you use it by specifying a
string like "eth1" to override the hardcoded "eth0" (e.g.:
defNic=eth1).

Additionally while walking through the code, I think I spotted some
potential errors.

Patch #01 fixes a potential buffer size problem. Might have been a typo.
I saw a warning from gcc when building busybox.

Patch #02 fixes a compiler issue with gcc 4.3.3 which demands a third
parameter to the open syscall.
The build process of busybox stopped with an error.

Patch #03 makes sure that the correct option gets preselected in the
use-dhcp-dialog-box.

I hope that you get the time to review the patches and that you find
them useful for inclusion in udpcdialog.

All of this has been done with the additional help of Tobias Selzer.

Kind regards,
Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-fix-input-buffer-size.patch
Type: text/x-patch
Size: 515 bytes
Desc: not available
Url : http://udpcast.linux.lu/pipermail/udpcast/attachments/20091011/9457308f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-fix-compile-on-gcc-4.3.3.patch
Type: text/x-patch
Size: 420 bytes
Desc: not available
Url : http://udpcast.linux.lu/pipermail/udpcast/attachments/20091011/9457308f/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03-preselect-correct-option-in-dhcp-dialog.patch
Type: text/x-patch
Size: 415 bytes
Desc: not available
Url : http://udpcast.linux.lu/pipermail/udpcast/attachments/20091011/9457308f/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04-add-defNic-config-option.patch
Type: text/x-patch
Size: 3916 bytes
Desc: not available
Url : http://udpcast.linux.lu/pipermail/udpcast/attachments/20091011/9457308f/attachment-0003.bin 


More information about the Udpcast mailing list