cryptsetup-multidisk-ssh/query_password

10 lines
233 B
Bash

#!/usr/bin/ash
cryptname="$1"
resolved="$2"
cpassfile="$3"
echo ""
echo "A password is required to access the ${cryptname} volume:"
read -rsp "Enter passphrase for ${resolved}: " password
echo -n "${password}" > ${cpassfile}
echo ""