diff options
Diffstat (limited to 'core/cryptsetup')
-rw-r--r-- | core/cryptsetup/PKGBUILD | 11 | ||||
-rw-r--r-- | core/cryptsetup/sd-encrypt | 42 |
2 files changed, 49 insertions, 4 deletions
diff --git a/core/cryptsetup/PKGBUILD b/core/cryptsetup/PKGBUILD index ad10778b7..e86517e26 100644 --- a/core/cryptsetup/PKGBUILD +++ b/core/cryptsetup/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 193404 2013-08-19 17:24:16Z thomas $ +# $Id: PKGBUILD 195910 2013-10-05 07:30:48Z thomas $ # Maintainer: Thomas Bächler <thomas@archlinux.org> pkgname=cryptsetup pkgver=1.6.2 -pkgrel=1 +pkgrel=2 pkgdesc="Userspace setup tool for transparent encryption of block devices using dm-crypt" arch=(i686 x86_64 'mips64el') license=('GPL') @@ -13,11 +13,13 @@ options=('!libtool' '!emptydirs') source=(http://cryptsetup.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2 http://cryptsetup.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2.asc encrypt_hook - encrypt_install) + encrypt_install + sd-encrypt) md5sums=('cd834da49fbe92dd66df02cc5c61280f' 'SKIP' 'c279d86d6dc18322c054d2272ebb9e90' - '21c45f9cab3e0b5165f68358884fbd0f') + '21c45f9cab3e0b5165f68358884fbd0f' + '6cf7e170ecd13e42fe829209628fdb4d') build() { cd "${srcdir}"/$pkgname-${pkgver} @@ -31,6 +33,7 @@ package() { # install hook install -D -m644 "${srcdir}"/encrypt_hook "${pkgdir}"/usr/lib/initcpio/hooks/encrypt install -D -m644 "${srcdir}"/encrypt_install "${pkgdir}"/usr/lib/initcpio/install/encrypt + install -D -m644 "${srcdir}"/sd-encrypt "${pkgdir}"/usr/lib/initcpio/install/sd-encrypt # usrmove cd "$pkgdir"/usr diff --git a/core/cryptsetup/sd-encrypt b/core/cryptsetup/sd-encrypt new file mode 100644 index 000000000..c18fd2f24 --- /dev/null +++ b/core/cryptsetup/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: |