Package: pbuilder-uml Version: 0.164 Severity: normal Tags: patch When pbuilder-user-mode-linux is setting up the chroot, it unconditionally writes out an /etc/network/interfaces for the chroot.
However, rootstrap supports creating a DHCP-ing uml setup, and apart from this and #391915, pbuilder-uml can use it. 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) --- pbuilder-user-mode-linux 2007-02-27 10:21:05.000000000 +1100 +++ pbuilder-user-mode-linux 2007-03-20 12:40:07.000000000 +1100 @@ -94,6 +94,7 @@ chmod 1777 ${UML_CHROOT_MOUNTPOINT}/tmp fi +if [ -n "${PBUILDER_COW}" -a "${UML_IP}" != 'dhcp']; then cat <<IP > ${UML_CHROOT_MOUNTPOINT}/etc/network/interfaces auto lo iface lo inet loopback @@ -108,13 +109,16 @@ gateway $UML_GATEWAY IP +fi cat <<SHELL > ${UML_CHROOT_MOUNTPOINT}/tmp/chrootshell #! /bin/bash ${UML_DEBUGMODE} # the shell executed inside chroot inside UML echo Starting network inside the chroot + mount -t proc /proc /proc /etc/init.d/networking stop /etc/init.d/networking start + umount /proc SHELL chmod a+x ${UML_CHROOT_MOUNTPOINT}/tmp/chrootshell chroot ${UML_CHROOT_MOUNTPOINT} /tmp/chrootshell -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-686 Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Versions of packages pbuilder-uml depends on: ii pbuilder 0.164 personal package builder for Debia ii rootstrap 0.3.24-2 A tool for building complete Linux ii user-mode-linux 2.6.18-1um-2 User-mode Linux (kernel) pbuilder-uml recommends no packages. -- no debconf information -- Paul "TBBle" Hampson, [EMAIL PROTECTED] Shorter .sig for a more eco-friendly paperless office.
pgpTsdvM3Rm1a.pgp
Description: PGP signature