summaryrefslogtreecommitdiffstats
path: root/abs/core/cryptsetup/install-sd-encrypt
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-02-24 02:05:20 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-02-24 02:05:20 (GMT)
commit802504e529d5ec18cc1c49a6921dea051c99017e (patch)
tree509b9589de7d21900580badd9ac07255b34f2a2d /abs/core/cryptsetup/install-sd-encrypt
parentaf7259e275822eeb9f66ae8078ba185621729e2a (diff)
downloadlinhes_pkgbuild-802504e529d5ec18cc1c49a6921dea051c99017e.zip
linhes_pkgbuild-802504e529d5ec18cc1c49a6921dea051c99017e.tar.gz
linhes_pkgbuild-802504e529d5ec18cc1c49a6921dea051c99017e.tar.bz2
cryptsetup: updat to 2.0.1
Diffstat (limited to 'abs/core/cryptsetup/install-sd-encrypt')
-rw-r--r--abs/core/cryptsetup/install-sd-encrypt45
1 files changed, 45 insertions, 0 deletions
diff --git a/abs/core/cryptsetup/install-sd-encrypt b/abs/core/cryptsetup/install-sd-encrypt
new file mode 100644
index 0000000..08d83d6
--- /dev/null
+++ b/abs/core/cryptsetup/install-sd-encrypt
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+build() {
+ local mod
+
+ add_module "dm-crypt"
+ if [[ $CRYPTO_MODULES ]]; then
+ for mod in $CRYPTO_MODULES; do
+ add_module "$mod"
+ done
+ else
+ add_all_modules "/crypto/"
+ fi
+
+ add_binary "dmsetup"
+ add_file "/usr/lib/udev/rules.d/10-dm.rules"
+ add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+ add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+
+ add_systemd_unit "cryptsetup.target"
+ add_binary "/usr/lib/systemd/system-generators/systemd-cryptsetup-generator"
+ add_binary "/usr/lib/systemd/systemd-cryptsetup"
+
+ add_systemd_unit "systemd-ask-password-console.path"
+ add_systemd_unit "systemd-ask-password-console.service"
+
+ # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
+ add_binary "/usr/lib/libgcc_s.so.1"
+
+ [[ -f /etc/crypttab.initramfs ]] && add_file "/etc/crypttab.initramfs" "/etc/crypttab"
+}
+
+help() {
+ cat <<HELPEOF
+This hook allows for an encrypted root device with systemd initramfs.
+
+See the manpage of systemd-cryptsetup-generator(8) for available kernel
+command line options. Alternatively, if the file /etc/crypttab.initramfs
+exists, it will be added to the initramfs as /etc/crypttab. See the
+crypttab(5) manpage for more information on crypttab syntax.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et: