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.
This commit is contained in:
Daniel Baumann 2012-07-08 19:23:12 +02:00
parent cfc14171c4
commit 3cd505f7d4
1 changed files with 7 additions and 1 deletions

View File

@ -7,4 +7,10 @@ set -e
# This removes udev persistent rules that cache the host systems mac address to # This removes udev persistent rules that cache the host systems mac address to
# remember its device name. # remember its device name.
rm -f /etc/udev/rules.d/*persistent-net.rules for _FILE in /etc/udev/rules.d/*persistent-net.rules
do
if [ -e "${_FILE}" ]
then
: > ${_FILE}
fi
done