summarylogtreecommitdiffstats
path: root/sd-encrypt
diff options
context:
space:
mode:
authormwberry2016-10-23 06:58:26 +0000
committermwberry2016-10-23 19:05:04 +0000
commit23afef4bfe7db11fd0cbad9f320e4821f422c6f7 (patch)
treebf7d379e4194cda51136e42638670e8d2537b4ae /sd-encrypt
downloadaur-23afef4bfe7db11fd0cbad9f320e4821f422c6f7.tar.gz
Apply Key Script Patch and Repackage for AUR
Forked From: cryptsetup@67cd5cf6ed87ddabef061b4c3abc71042ea58251 I could not preserve the git log because AUR checks all parent commits for .SRCINFO, even across merges.
Diffstat (limited to 'sd-encrypt')
-rw-r--r--sd-encrypt42
1 files changed, 42 insertions, 0 deletions
diff --git a/sd-encrypt b/sd-encrypt
new file mode 100644
index 000000000000..c18fd2f2422f
--- /dev/null
+++ b/sd-encrypt
@@ -0,0 +1,42 @@
+#!/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
+
+ [[ -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: