kexec: fix authorized_keys on debian

This commit is contained in:
lassulus 2022-10-13 12:41:55 +00:00
parent 02b79ab079
commit a76594ab4d

View file

@ -20,7 +20,8 @@
mkdir -p initrd/ssh
pushd initrd
if [ -e /root/.ssh/authorized_keys ]; then
cat /root/.ssh/authorized_keys >> ssh/authorized_keys
# workaround for debian shenanigans
grep -o '\(ssh-[^ ]* .*\)' /root/.ssh/authorized_keys >> ssh/authorized_keys
fi
if [ -e /etc/ssh/authorized_keys.d/root ]; then
cat /etc/ssh/authorized_keys.d/root >> ssh/authorized_keys