diff options
author | Junichi Uekawa <dancer@dancer64.netfort.gr.jp> | 2007-03-29 00:34:04 +0900 |
---|---|---|
committer | Junichi Uekawa <dancer@dancer64.netfort.gr.jp> | 2007-03-29 00:34:04 +0900 |
commit | ba6eeb57a776640a87dbe64dea155aaaade991cd (patch) | |
tree | 628652757d037da23e0d937cb77641b5ca50e292 /pbuilder-user-mode-linux | |
parent | bdedf208eb3b126694f8ace219a94b56af98dfd3 (diff) | |
download | pbuilder-ba6eeb57a776640a87dbe64dea155aaaade991cd.tar pbuilder-ba6eeb57a776640a87dbe64dea155aaaade991cd.tar.gz |
415544: support UML_IP=dhcp
Diffstat (limited to 'pbuilder-user-mode-linux')
-rwxr-xr-x | pbuilder-user-mode-linux | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 8776cf1..be22ed8 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -101,7 +101,8 @@ else chmod 1777 ${UML_CHROOT_MOUNTPOINT}/tmp fi -cat <<IP > ${UML_CHROOT_MOUNTPOINT}/etc/network/interfaces +if [ -n "${PBUILDER_COW}" -a "${UML_IP}" != 'dhcp']; then + cat <<IP > ${UML_CHROOT_MOUNTPOINT}/etc/network/interfaces auto lo iface lo inet loopback @@ -115,13 +116,17 @@ iface eth0 inet static 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 |