From: Guido Trotter Date: Fri, 11 Jan 2008 12:07:52 +0000 (+0000) Subject: Remove generated network rules on instance import X-Git-Tag: v0.5~16 X-Git-Url: http://git.equinoxoli.org/?p=ext%2Finstance-debootstrap.git;a=commitdiff_plain;h=709aef2cf8369097d6345bd930b5df6bf744f9f9 Remove generated network rules on instance import udev generates rules to maintain the order of the network interfaces stable. When importing an instance, though, its mac address may change, and networking be broken. This patch removes the generated network rules file, making udev create a new one after the first boot of an imported instance. This issue was first spotted by Gunnar Wagenknecht. Reviewed-by: iustinp --- diff --git a/import b/import index 83bfc39..2803756 100755 --- a/import +++ b/import @@ -50,7 +50,7 @@ TMPDIR=`mktemp -d` || exit 1 trap "umount $TMPDIR; rmdir $TMPDIR" EXIT mount $blockdev $TMPDIR ( cd $TMPDIR; restore -r -y -f - ) - +rm -f $TMPDIR/etc/udev/rules.d/z25_persistent-net.rules umount $TMPDIR rmdir $TMPDIR trap - EXIT