Re: Customized scripts in Debian Installer
On Tuesday 28 April 2009, aaraujo@cenditel.gob.ve wrote:
> The command I want to execute is:
>
> cryptsetup -y create private /dev/sda5
>
> which does not have an noninteractive mode.
Just use a redirect:
echo "$PASSWORD" | cryptsetup -y create private /dev/sda5
or:
cryptsetup -y create private /dev/sda5 </path/to/file-containing-password
or even:
cryptsetup -y create private /dev/sda5 <<EOF
$PASSWORD
EOF
If the command needs multiple inputs, just put them on separate lines.
But looking at the partman-crypto component which uses the same command,
it looks like there is a -d option to cryptsetup to pass a password on
the command line... (See /lib/partman/lib/crypto-base.sh from a running
instance of the installer.)
Cheers,
FJP
Reply to: