diff --git a/initramfs/luksrku-hook b/initramfs/luksrku-hook index bf74d2c..9a38f89 100755 --- a/initramfs/luksrku-hook +++ b/initramfs/luksrku-hook @@ -21,5 +21,8 @@ esac . /usr/share/initramfs-tools/hook-functions +if [ ! -f /etc/luksrku-server.bin ]; then + exit 0 +fi cp /etc/luksrku-server.bin ${DESTDIR}/etc/ copy_exec /usr/local/sbin/luksrku /sbin diff --git a/initramfs/luksrku-script b/initramfs/luksrku-script index 53e0cde..7d30be1 100755 --- a/initramfs/luksrku-script +++ b/initramfs/luksrku-script @@ -21,9 +21,11 @@ case $1 in esac ETH_DEV="eno1" -/bin/ifconfig $ETH_DEV up 192.168.1.29 netmask 255.255.255.0 -/bin/ip route add default dev $ETH_DEV -#/sbin/luksrku --server-mode -v -k /etc/luksrku-server.bin -/bin/sh +ETH_IP="192.168.1.29" +ETH_NETMASK="255.255.255.0" + +/bin/ifconfig "$ETH_DEV" up "$ETH_IP" netmask "$ETH_NETMASK" +/bin/ip route add default dev "$ETH_DEV" +/sbin/luksrku --server-mode -v -k /etc/luksrku-server.bin exit 0