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
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