db-move: moved linux-zen from [testing] to [extra] (x86_64)
[arch-packages.git] / lvm2 / repos / core-x86_64 / lvm2_install
blob1ab725f0147f25cd58d69c37bb6c37d61648c17a
1 #!/usr/bin/bash
3 build() {
4 local symlink
6 # device mapper modules
7 map add_module \
8 'dm-mod' \
9 'dm-snapshot' \
10 'dm-mirror' \
11 'dm-cache' \
12 'dm-cache-smq' \
13 'dm-thin-pool'
15 # from thin-provisioning-tools
16 add_binary 'pdata_tools'
17 for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
18 add_symlink "/usr/bin/${symlink}" 'pdata_tools'
19 done
21 # udev rules and lvm configuration
22 map add_udev_rule \
23 '10-dm.rules' \
24 '11-dm-lvm.rules' \
25 '13-dm-disk.rules' \
26 '95-dm-notify.rules' \
27 '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
29 # this udev rule is specific for systemd and non-systemd systems
30 if command -v add_systemd_unit >/dev/null; then
31 add_udev_rule '69-dm-lvm.rules'
32 else
33 add_udev_rule '/usr/lib/initcpio/udev/69-dm-lvm.rules'
36 # config file
37 add_file '/etc/lvm/lvm.conf'
38 sed -i -e 's/^[[:space:]#]*monitoring = [[:digit:]]\+\s*$/\tmonitoring = 0/' \
39 -e '/^$/d' -e '/^[[:space:]]*#/d' "${BUILDROOT}/etc/lvm/lvm.conf"
42 help() {
43 cat <<HELPEOF
44 This hook enables LVM2 volumes in initramfs.
45 HELPEOF