From fadc18812bf0bfa766d4c1df2ffb41dddf217750 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 19 Jun 2026 13:29:36 +0000 Subject: [PATCH] armbian_rootenc_setup.sh: new `authorized_keys_dir` variable --- scripts/armbian_rootenc_setup.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/armbian_rootenc_setup.sh b/scripts/armbian_rootenc_setup.sh index ce03d42..156abec 100755 --- a/scripts/armbian_rootenc_setup.sh +++ b/scripts/armbian_rootenc_setup.sh @@ -437,11 +437,10 @@ _test_sdcard_mounted() { } get_authorized_keys() { - authorized_keys_dir="authorized_keys.d" [ -e $authorized_keys_dir ] || { - if [ -f 'authorized_keys' ]; then + if [ -f $authorized_keys_file ]; then mkdir -p $authorized_keys_dir - mv 'authorized_keys' $authorized_keys_dir + mv $authorized_keys_file $authorized_keys_dir NEW_AUTHORIZED_KEYS='y' else _test_unlocking_host_available @@ -1183,9 +1182,9 @@ edit_initramfs_modules() { copy_authorized_keys() { local dest="$TARGET_ROOT$dropbear_dir" mkdir -p $dest - /bin/cat $authorized_keys_dir/* > "$dest/authorized_keys" - chmod 644 "$dest/authorized_keys" - _display_file "$dest/authorized_keys" + /bin/cat $authorized_keys_dir/* > "$dest/$authorized_keys_file" + chmod 644 "$dest/$authorized_keys_file" + _display_file "$dest/$authorized_keys_file" } create_fstab() { @@ -1485,6 +1484,9 @@ ARG1=$1 shift +authorized_keys_dir='authorized_keys.d' +authorized_keys_file='authorized_keys' + _set_env_vars $@ if [ "$ARG1" == 'in_target' ]; then