luksrku/initramfs/luksrku-script
Johannes Bauer 625998fc8a Only execute luksrku when an actual server config is present
Previously, it was always executed (although it shouldn't have made it
into the image if no /etc/luksrku-server.bin were present).
2018-01-16 19:01:55 +01:00

33 lines
392 B
Bash
Executable File

#!/bin/sh
#
# Copyright 2016-2017 Johannes Bauer <joe@johannes-bauer.com>
# Released under GPLv3
PREREQ="lvm2"
#
# Standard initramfs preamble
#
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /scripts/functions
if [ ! -f /etc/luksrku-server.bin ]; then
exit 0
fi
configure_networking
/sbin/luksrku --server-mode -v -k /etc/luksrku-server.bin
exit 0