summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 20:07:09 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 20:07:09 +0200
commit01e91f9c2196571f16ed1bea8f4d72bddfa0ee6b (patch)
tree7a8264ab2c28316b2d385877650cd2f09d6b81b0
parent45f1f9f0a0783479dec16138fdd095291577c843 (diff)
downloadvyos-live-build-01e91f9c2196571f16ed1bea8f4d72bddfa0ee6b.tar.gz
vyos-live-build-01e91f9c2196571f16ed1bea8f4d72bddfa0ee6b.zip
Adding hook to disable 70-persistent-cd.rules udev rule to prevent udev remember the cd device name both the one of the build system and the one of the live system (Closes: #706926).
-rwxr-xr-xfunctions/defaults.sh1
-rwxr-xr-xshare/hooks/0200-remove-udev-persistent-cd-rules.chroot13
2 files changed, 14 insertions, 0 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 049918759..d2b71058b 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -507,6 +507,7 @@ Set_defaults ()
remove-openssh-server-host-keys \
remove-python-py \
remove-temporary-files \
+ remove-udev-persistent-cd-rules \
remove-udev-persistent-net-rules \
remove-systemd-machine-id \
update-apt-file-cache \
diff --git a/share/hooks/0200-remove-udev-persistent-cd-rules.chroot b/share/hooks/0200-remove-udev-persistent-cd-rules.chroot
new file mode 100755
index 000000000..bdfe52d96
--- /dev/null
+++ b/share/hooks/0200-remove-udev-persistent-cd-rules.chroot
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# Remove udev persistent rules.
+#
+# This removes udev persistent rules that cache the host systems cd drive as
+# well as the running live systems cd drive to remember its device name.
+
+if [ -e /etc/udev/rules.d ]
+then
+ > /etc/udev/rules.d/70-persistent-cd.rules
+fi