Re: [Ipcop-svn] SF.net SVN:ipcop:[5587] ipcop/trunk/src/installer/installer.c
"Gilles Espinasse" <[email protected]>
| Newsgroups | gmane.comp.security.ipcop.devel |
|---|---|
| Message-ID | <063301cbf248$25dbccc0$f9b5a8c0@pii350> |
----- Original Message ----- From: "Olaf Westrik" <weizen_42-Yz37vSk3/[email protected]> To: <[email protected]> Cc: <[email protected]> Sent: Sunday, April 03, 2011 10:05 PM Subject: Re: [IPCop-devel] [Ipcop-svn] SF.net SVN:ipcop:[5587] ipcop/trunk/src/installer/installer.c > On 2011-04-03 17:43, [email protected] wrote: > > > There is another issue seen with 'install codepath=1' > > That will fail (at least on pxe booted machine) as the string with ifconfig look wrong, like > > Running command: ifconfig eth0 192.168.1.120192.168.1.120192.168.1.120192.168.1.120 netmask 255.255.255.0255.255.255.0255.255.255.0255.255.255.0 up > > > We currently have this: > /* if local IP has not been found by pxe, try to find by dhcp */ > if (strlen(local_IP) == 0 || codepath == 1) { > > Afterwards, when a DHCP server is found this is executed (for local_IP, > similar for netmask): > strcat(local_IP, find_kv(kv_dhcp_params, "IP")); > I suppose that should work, replacing strcat with strcpy. > > I just tried with codepath=1 and a DHCP server available on 2 network > interfaces, the result is 1+2 IP addresses. First from the ip: > command-line, followed by 2 IP addresses from dhcp client. > > I'd have to search for the intention of codepath, as I've never used it. > > > Olaf > I even did not remember that's me who added that, that's what svn show. By the way, that's not a bad idea to allow easy testing of the different case (pxe, dhcp, manual), even when booting by pxe. But implementation could be improved : - codepath is a too generic name, I would prefer to change codepath name to netboot, - we could use that variable to not do some actions * copy dhcp-eth* only when using dhcp * use ifconfig only when using manual setting Gilles ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf