OCaml 4.14.0 rebuild
[arch-packages.git] / lvm2 / trunk / lvm2_install
blob69a476369c0a13b7328a0faeab146954055eccba
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 '/^\smonitoring =/s/1/0/' "${BUILDROOT}/etc/lvm/lvm.conf"
41 help() {
42 cat <<HELPEOF
43 This hook enables LVM2 volumes in initramfs.
44 HELPEOF