On Wed, Mar 28, 2007 at 08:16:01AM +0900, Junichi Uekawa wrote:
> Hi,

>> The below patch only overwrites the /etc/network/interfaces in
>> the chroot if a UML_IP is specified, and refuses to do so when
>> a COWFILE has not been specified, or if pbuilder-uml.conf has
>> UML_IP=dhcp
>> in it.
>> 
>> (You could change it to be UML_IP= if you change "${UML_IP} != 'dhcp'
>> to be -n "${UML_IP}". I don't mind which style myself.)
>> 
>> This allows command-line overriding of the uml_ip to run multiple
>> instances of a static-IP'd UML, and without a cow file, you
>> really shouldn't be trying to run multiple instances anyway.
>> 
>> (The second change allows dhclient3 to work, it needs /proc for some
>> reason)

> The concept of the patch sounds good.

> This part below is executed inside user-mode-linux, and by that time,
> PBUILDER_COW is not defined. Are you sure about this logic?

>> +if [ -n "${PBUILDER_COW}" -a "${UML_IP}" != 'dhcp']; then
>>  cat <<IP > ${UML_CHROOT_MOUNTPOINT}/etc/network/interfaces
>>  auto lo
>>  iface lo inet loopback

Hmm. Aren't the variables in this resolved at <<EOF time, ie
outside the UML? UML_CHROOT_MOUNTPOINT would have the same
issue, otherwise.

That is to say, the actual script written would contain the value
of PBUILDER_COW if any.

Testing confirms, the initscript in /tmp/ on the host has
if [ -n "/home/tbble/umltmp//1670.cow," -a "dhcp" != 'dhcp' ]; then
in it.

-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, B.Sc, LPI, MCSE
On-hiatus Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
[EMAIL PROTECTED]

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.1/au/
-----------------------------------------------------------

Attachment: pgpPb5juUHCO8.pgp
Description: PGP signature

Reply via email to