OSDN Git Service

added pm-wrapper-interface
[alterlinux/alterlinux-pkgbuilds.git] / alter-stable / any / plymouth / plymouth.encrypt_install
1 #!/bin/bash
2
3 build() {
4     local mod
5
6     add_module dm-crypt
7     if [[ $CRYPTO_MODULES ]]; then
8         for mod in $CRYPTO_MODULES; do
9             add_module "$mod"
10         done
11     else
12         add_all_modules '/crypto/'
13     fi
14
15     add_binary "cryptsetup"
16     add_binary "dmsetup"
17     add_file "/usr/lib/udev/rules.d/10-dm.rules"
18     add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
19     add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
20     add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
21
22     # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
23     add_binary "/usr/lib/libgcc_s.so.1"
24
25     add_runscript
26 }
27
28 help() {
29     cat <<HELPEOF
30 This hook allows for an encrypted root device. Users should specify the device
31 to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
32 where 'device' is the path to the raw device, and 'dmname' is the name given to
33 the device after unlocking, and will be available as /dev/mapper/dmname.
34
35 For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
36 the kernel cmdline, where 'device' represents the raw block device where the key
37 exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
38 the absolute path of the keyfile within the device.
39
40 Without specifying a keyfile, you will be prompted for the password at runtime.
41 This means you must have a keyboard available to input it, and you may need
42 the keymap hook as well to ensure that the keyboard is using the layout you
43 expect.
44 HELPEOF
45 }
46
47 # vim: set ft=sh ts=4 sw=4 et: