summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Cull <run2000@gmail.com>2014-05-10 19:01:27 +1000
committerGabriel <g2p.code@gmail.com>2014-05-10 14:52:01 +0200
commit0aeb7a0a38c26d2da09c364148b037de7deeb7e5 (patch)
treefe14d665bca0f85989312f856d5d45ed8f151ad4
parent7093163fafb8545cbb8ea04c5bb71253ce0c18f3 (diff)
Take user-modified rules from /etcv1.0.6
Copy udev rules from /etc/udev/rules.d/ if they have been user-modified, otherwise copy from /lib/udev/rules.d/ instead. Follows usual udev conventions for modifying rules files.
-rwxr-xr-xinitramfs/hook7
1 files changed, 6 insertions, 1 deletions
diff --git a/initramfs/hook b/initramfs/hook
index e618e1a..a6baa24 100755
--- a/initramfs/hook
+++ b/initramfs/hook
@@ -16,7 +16,12 @@ esac
. /usr/share/initramfs-tools/hook-functions
-cp -pt "${DESTDIR}/lib/udev/rules.d" /lib/udev/rules.d/69-bcache.rules
+if [ -e /etc/udev/rules.d/69-bcache.rules ]; then
+ cp -pt "${DESTDIR}/lib/udev/rules.d" /etc/udev/rules.d/69-bcache.rules
+elif [ -e /lib/udev/rules.d/69-bcache.rules ]; then
+ cp -pt "${DESTDIR}/lib/udev/rules.d" /lib/udev/rules.d/69-bcache.rules
+fi
+
copy_exec /lib/udev/bcache-register
copy_exec /lib/udev/probe-bcache
manual_add_modules bcache