From 75783ae8d6f951c5b7971b4563237193ffae13e4 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 9 Sep 2025 18:13:43 +0300 Subject: [PATCH] support new APT sources format --- scripts/armbian_rootenc_setup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/armbian_rootenc_setup.sh b/scripts/armbian_rootenc_setup.sh index 5bcea95..7128fcb 100755 --- a/scripts/armbian_rootenc_setup.sh +++ b/scripts/armbian_rootenc_setup.sh @@ -1051,14 +1051,15 @@ _kernels_match() { } copy_etc_files_distro_specific() { - local files='/etc/apt/sources.list /etc/apt/sources.list.d/armbian.list' + local files="/etc/apt/sources.list $(echo /etc/apt/sources.list.d/*.{sources,list})" if _distros_match; then for f in $files; do - _copy_to_target $f + [ -e "$f" ] && _copy_to_target $f done else warn 'Warning: host and target distros do not match, attempting to rewrite files:' for f in $files; do + [ -e "$f" ] || continue imsg " rewriting $f" if [ "$target_armbian_keyring_signed" -a $(basename $f) == 'armbian.list' ]; then repl='deb [signed-by=\/usr\/share\/keyrings\/armbian.gpg] http'