diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-08 19:23:12 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-08 19:23:15 +0200 |
commit | 3cd505f7d4b2650d346e00e7f305328f26233674 (patch) | |
tree | 7c8e370f8b2fbfdf8ff379ba4658f5f1bb11cb3c | |
parent | cfc14171c433698b33e4737b97359469dbcc6469 (diff) | |
download | vyos-live-build-3cd505f7d4b2650d346e00e7f305328f26233674.tar.gz vyos-live-build-3cd505f7d4b2650d346e00e7f305328f26233674.zip |
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.
-rwxr-xr-x | share/hooks/008-remove-udev-persistent-rules.chroot | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/hooks/008-remove-udev-persistent-rules.chroot b/share/hooks/008-remove-udev-persistent-rules.chroot index c7eec20b1..148ba30d1 100755 --- a/share/hooks/008-remove-udev-persistent-rules.chroot +++ b/share/hooks/008-remove-udev-persistent-rules.chroot @@ -7,4 +7,10 @@ set -e # This removes udev persistent rules that cache the host systems mac address to # 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 |