#!/bin/bash make_etc_passwd() { echo 'root:x:0:0:root:/root:/bin/cryptsetup_shell' > "${BUILDROOT}"/etc/passwd echo '/bin/cryptsetup_shell' > "${BUILDROOT}"/etc/shells } 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 "cryptsetup" 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_binary "/usr/share/cryptsetup-multidisk-ssh/bin/cryptsetup_shell" "/bin/cryptsetup_shell" add_binary "/usr/share/cryptsetup-multidisk-ssh/bin/query_password" "/bin/query_password" make_etc_passwd add_runscript } help() { cat <