summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-08-23 17:13:45 +0200
committerDaniel Baumann <daniel@debian.org>2011-08-23 17:13:45 +0200
commit88befb176680d6f88bcdd11bd347d0f1680efdf5 (patch)
tree88d55e57177dbf444d5295f2188c3d138f52e89b
parent9a59c0a2d65dde87839e9d184a9e561885b8b743 (diff)
downloadvyos-live-build-88befb176680d6f88bcdd11bd347d0f1680efdf5.tar.gz
vyos-live-build-88befb176680d6f88bcdd11bd347d0f1680efdf5.zip
Moving removal of udev persistent rules from chroot_hacks to a hook, that way it can be easily skipped if desired.
-rwxr-xr-xfunctions/defaults.sh6
-rwxr-xr-xscripts/build/lb_chroot_hacks3
-rwxr-xr-xshare/hooks/005-remove-udev-persistent-rules.chroot10
3 files changed, 14 insertions, 5 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 5538dfbae..3fc895f44 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -588,7 +588,8 @@ Set_defaults ()
update-apt-xapian-index \
update-mlocate-database \
remove-openssh-server-host-keys \
- remove-python-py}"
+ remove-python-py \
+ remove-udev-persistent-rules}"
;;
kubuntu)
@@ -597,7 +598,8 @@ Set_defaults ()
update-mlocate-database \
remove-gnome-icon-cache \
remove-openssh-server-host-keys \
- remove-python-py}"
+ remove-python-py \
+ remove-udev-persistent-rules}"
;;
esac
diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks
index 501352f15..c6e2775d9 100755
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -140,9 +140,6 @@ do
esac
done
-# Removing udev mac caching rule
-rm -f chroot/etc/udev/rules.d/*persistent-net.rules
-
case "${LB_BINARY_IMAGES}" in
net)
if [ ! -f chroot/usr/bin/smbmount ]
diff --git a/share/hooks/005-remove-udev-persistent-rules.chroot b/share/hooks/005-remove-udev-persistent-rules.chroot
new file mode 100755
index 000000000..c7eec20b1
--- /dev/null
+++ b/share/hooks/005-remove-udev-persistent-rules.chroot
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+# Remove udev persistent rules.
+#
+# 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