OSDN Git Service

[add] : i686/alter-stable
[alterlinux/alterlinux-pkgbuilds.git] / alter-stable / i686 / 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_binary "plymouth"
18     add_file "/usr/lib/udev/rules.d/10-dm.rules"
19     add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
20     add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
21     add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
22     add_binary "/usr/lib/plymouth/label.so"
23     add_binary "/usr/lib/plymouth/text.so"
24     add_file "/usr/share/fonts/TTF/DejaVuSans.ttf"
25     add_file "/etc/fonts/fonts.conf"
26     add_file "/etc/fonts/conf.d/60-latin.conf"
27
28     # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
29     add_binary "/usr/lib/libgcc_s.so.1"
30
31     add_runscript
32 }
33
34 help() {
35     cat <<HELPEOF
36 This hook allows for an encrypted root device. Users should specify the device
37 to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
38 where 'device' is the path to the raw device, and 'dmname' is the name given to
39 the device after unlocking, and will be available as /dev/mapper/dmname.
40
41 For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
42 the kernel cmdline, where 'device' represents the raw block device where the key
43 exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
44 the absolute path of the keyfile within the device.
45
46 Without specifying a keyfile, you will be prompted for the password at runtime.
47 This means you must have a keyboard available to input it, and you may need
48 the keymap hook as well to ensure that the keyboard is using the layout you
49 expect.
50 HELPEOF
51 }
52
53 # vim: set ft=sh ts=4 sw=4 et: