From f5f8671ab6f22f63990dcd5cb02c2bf2b32e0659 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 8 Jul 2012 19:25:13 +0200 Subject: Truncating udev persistent net rules in remove-udev-persistent-rules.chroot hook rather than to remove them (Closes: #680763). This allows to have non-persistent net devices with persistence properly, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680763#10 for more information. --- scripts/build/lb_chroot_hacks | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks index d27d2d48b..804811683 100755 --- a/scripts/build/lb_chroot_hacks +++ b/scripts/build/lb_chroot_hacks @@ -147,8 +147,14 @@ rm -f chroot/var/lib/dbus/machine-id # they are regenerated by live-config. rm -f chroot/etc/ssh/ssh_host_*_key chroot/etc/ssh/ssh_host_*_key.pub -# Removing udev mac caching rule -rm -f chroot/etc/udev/rules.d/*persistent-net.rules +# Truncating udev mac caching rule +for _FILE in /etc/udev/rules.d/*persistent-net.rules +do + if [ -e "${_FILE}" ] + then + : > ${_FILE} + fi +done case "${LB_BINARY_IMAGES}" in net) -- cgit v1.2.3