diff options
Diffstat (limited to 'debian/local')
-rw-r--r-- | debian/local/btrfs-lvm.udev | 6 | ||||
-rw-r--r-- | debian/local/btrfs.hook | 29 | ||||
-rw-r--r-- | debian/local/btrfs.local-premount | 23 | ||||
-rw-r--r-- | debian/local/btrfs.udev | 7 |
4 files changed, 65 insertions, 0 deletions
diff --git a/debian/local/btrfs-lvm.udev b/debian/local/btrfs-lvm.udev new file mode 100644 index 00000000..938253b7 --- /dev/null +++ b/debian/local/btrfs-lvm.udev @@ -0,0 +1,6 @@ +SUBSYSTEM!="block", GOTO="btrfs_lvm_end" +ENV{DM_UUID}!="LVM-?*", GOTO="btrfs_lvm_end" +RUN+="/sbin/modprobe btrfs" +RUN+="/bin/btrfs device scan $env{DEVNAME}" + +LABEL="btrfs_lvm_end" diff --git a/debian/local/btrfs.hook b/debian/local/btrfs.hook new file mode 100644 index 00000000..d31199cb --- /dev/null +++ b/debian/local/btrfs.hook @@ -0,0 +1,29 @@ +#!/bin/sh + +set -e + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +if [ -x /bin/btrfs ] +then + copy_exec /bin/btrfs /bin + copy_exec /bin/btrfs-zero-log + if [ ! -x /usr/share/initramfs-tools/hooks/fsck ] && [ ! -x /etc/initramfs-tools/hooks/fsck ] + then + copy_exec /bin/fsck.btrfs /bin + fi +fi diff --git a/debian/local/btrfs.local-premount b/debian/local/btrfs.local-premount new file mode 100644 index 00000000..7f7bf27c --- /dev/null +++ b/debian/local/btrfs.local-premount @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +if [ -x /bin/btrfs ] +then + modprobe btrfs + /bin/btrfs device scan 2> /dev/null +fi diff --git a/debian/local/btrfs.udev b/debian/local/btrfs.udev new file mode 100644 index 00000000..e0905c49 --- /dev/null +++ b/debian/local/btrfs.udev @@ -0,0 +1,7 @@ +SUBSYSTEM!="block", GOTO="btrfs_end" +ACTION!="add|change", GOTO="btrfs_end" +ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end" +RUN+="/sbin/modprobe btrfs" +RUN+="/bin/btrfs device scan $env{DEVNAME}" + +LABEL="btrfs_end" |