From 4adfb68a3df9d2e767f0a2b78d340772962a92a1 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 13 Nov 2024 12:22:53 +0000 Subject: [PATCH] armbian_rootenc_setup.sh: whitespace --- scripts/armbian_rootenc_setup.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/armbian_rootenc_setup.sh b/scripts/armbian_rootenc_setup.sh index 88e738a..48e06e2 100755 --- a/scripts/armbian_rootenc_setup.sh +++ b/scripts/armbian_rootenc_setup.sh @@ -919,14 +919,27 @@ copy_etc_files() { } _set_target_vars() { + target_distro=$(chroot $TARGET_ROOT 'lsb_release' '--short' '--codename') target_kernel=$(chroot $TARGET_ROOT 'ls' '/boot' | egrep '^vmlinu[xz]') target_armbian_keyring_signed= + case $target_distro in - bionic|buster|focal) eth_dev='eth0' dropbear_dir='/etc/dropbear-initramfs' dropbear_conf='config' ;; - bullseye|jammy) eth_dev='eth0' dropbear_dir='/etc/dropbear/initramfs' dropbear_conf='config' ;; - bookworm|noble|*) eth_dev='end0' dropbear_dir='/etc/dropbear/initramfs' dropbear_conf='dropbear.conf' target_armbian_keyring_signed='y' ;; + bionic|buster|focal) + eth_dev='eth0' + dropbear_dir='/etc/dropbear-initramfs' + dropbear_conf='config' ;; + bullseye|jammy) + eth_dev='eth0' + dropbear_dir='/etc/dropbear/initramfs' + dropbear_conf='config' ;; + bookworm|noble|*) + eth_dev='end0' + dropbear_dir='/etc/dropbear/initramfs' + dropbear_conf='dropbear.conf' + target_armbian_keyring_signed='y' ;; esac + imsg "$(printf '%-8s %-28s %s' '' 'Host' 'Target')" imsg "$(printf '%-8s %-28s %s' '' '----' '------')" imsg "$(printf '%-8s %-28s %s' 'distro:' $host_distro $target_distro)" @@ -1158,7 +1171,9 @@ exit 0' apt_remove_target_pkgs() { set +e - if [ "$IP_ADDRESS" == 'none' ]; then apt --yes purge 'dropbear-initramfs'; fi + if [ "$IP_ADDRESS" == 'none' ]; then + apt --yes purge 'dropbear-initramfs' + fi apt --yes purge 'bash-completion' 'command-not-found' set -e }