summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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