Merge pull request #23 from nix-community/debian-workaround

kexec: fix authorized_keys on debian
This commit is contained in:
Jörg Thalheim 2022-10-13 14:43:09 +02:00 committed by GitHub
commit 3d373f7cf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,8 @@
mkdir -p initrd/ssh mkdir -p initrd/ssh
pushd initrd pushd initrd
if [ -e /root/.ssh/authorized_keys ]; then 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 fi
if [ -e /etc/ssh/authorized_keys.d/root ]; then if [ -e /etc/ssh/authorized_keys.d/root ]; then
cat /etc/ssh/authorized_keys.d/root >> ssh/authorized_keys cat /etc/ssh/authorized_keys.d/root >> ssh/authorized_keys