[rhinstaller/anaconda/pulls/110 master] Add a kickstart test for escrow packets and backup passphrases

dashea installerbot-noreply at redhat.com
Tue May 19 04:09:10 UTC 2015


> @@ -0,0 +1,107 @@
> +%pre
> +# Create an nss database for the escrow certifcate
> +mkdir -p /tmp/escrow_test/nss
> +certutil -d /tmp/escrow_test/nss --empty-password -N
> +
> +# Create a self-signed certificate
> +# certutil waits for input if not provided with entropy data (-z). Use some
> +# crappy data from urandom in the hope of leaving some entropy for the LUKS
> +# operations to use later.
> +dd if=/dev/urandom of=/tmp/escrow_test/entropy bs=20 count=1
> +certutil -d /tmp/escrow_test/nss -S -x -n escrow_cert \
> +    -s 'CN=Escrow Test' -t ',,TC' -z /tmp/escrow_test/entropy
> +
> +# Export the certificate
> +certutil -d /tmp/escrow_test/nss -L -n escrow_cert -a -o /tmp/escrow_test/escrow.crt
> +%end
> +
> +url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/
> +install
> +network --bootproto=dhcp
> +
> +bootloader --timeout=1
> +zerombr
> +clearpart --all
> +part --fstype=ext4 --size=4400 /
> +part --fstype=ext4 --size=500 /boot
> +part --fstype=swap --size=500 swap
> +
> +# Create a partition that's easy to umount and poke at in %post
> +part --fstype=ext4 --size=500 --encrypted --passphrase='passphrase' --escrowcert=file:///tmp/escrow_test/escrow.crt --backuppassphrase /home
> +
> +keyboard us
> +lang en
> +timezone America/New_York
> +rootpw qweqwe
> +shutdown
> +
> +%pre-install
> +# Copy the escrow database to the install path so we can use it during %post
> +mkdir $ANA_INSTALL_PATH/root
> +cp -a /tmp/escrow_test $ANA_INSTALL_PATH/root/
> +%end
> +
> +%packages
> +volume_key
> +%end
> +
> +%post
> +# First, check that the escrow stuff is there
> +ls "/root/*-escrow" >/dev/null 2>&1

I don't know what's going with these quotes, but I'm pretty sure they're wrong. I think just dropping them, and in the backup-passphrase line below, would work more or less right.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/110#discussion_r30568083


More information about the anaconda-patches mailing list