X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=9e1437f28207573a976011457c4c1ee8e4113de8;hp=bc933531be275fa5f8f0a9fc2107be50c2f55d1f;hb=12bcb2d7ae0cae32a05498a1599a95d36693eb3c;hpb=4adc4f825febe8e78db2809416b047052fb20d28 diff --git a/chroot-script b/chroot-script index bc93353..9e1437f 100644 --- a/chroot-script +++ b/chroot-script @@ -270,13 +270,20 @@ hosts() { # set up /etc/network/interfaces {{{ interfaces() { - if ! [ -f /etc/network/interfaces ] ; then + touch /etc/network/interfaces + # make sure we add the entries only once + if ! grep -q eth0 /etc/network/interfaces ; then echo "Setting up /etc/network/interfaces" cat >> /etc/network/interfaces << EOF + +# loopback device: iface lo inet loopback -iface eth0 inet dhcp auto lo -auto eth0 + +# eth0: +# iface eth0 inet dhcp +# auto eth0 + EOF fi }