From 018bdb500a72657bd1b4a87c2d46fb611732c2b4 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Fri, 22 Sep 2023 01:28:14 -0400 Subject: [PATCH] Added apt keyrings copy/restore --- scripts/os_debian | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/os_debian b/scripts/os_debian index 9fd9b67..9b89c57 100755 --- a/scripts/os_debian +++ b/scripts/os_debian @@ -23,6 +23,7 @@ hook_pre() { cp -a /etc/apt/sources.list "$restoreDir/" rsync -avhHi /etc/apt/sources.list.d "$restoreDir/" rsync -avhHi /etc/apt/trusted.gpg.d "$restoreDir/" + [[ -d /etc/apt/keyrings ]] && rsync -avhHi /etc/apt/keyrings "$restoreDir/" cat > restore.sh </dev/null || install+=" rsync" -dpkg-query -s 'aptitude' &>/dev/null || install+=" aptitude" -dpkg-query -s 'borgbackup' &>/dev/null || install+=" borgbackup" -dpkg-query -s 'borgmatic' &>/dev/null || install+=" borgmatic" +dpkg-query -s 'rsync' &>/dev/null || install+=" rsync" +dpkg-query -s 'aptitude' &>/dev/null || install+=" aptitude" +dpkg-query -s 'borgbackup' &>/dev/null || install+=" borgbackup" +dpkg-query -s 'borgmatic' &>/dev/null || install+=" borgmatic" +dpkg-query -s 'apt-transport-https' &>/dev/null || install+=" apt-transport-https" if [[ -n "\$install" ]]; then apt -y install \$install @@ -56,6 +58,7 @@ grep ':i386' InstallOnly.list &>/dev/null && dpkg --add-architecture i386 cp -a sources.list /etc/apt/sources.list rsync --ignore-existing -raz sources.list.d/ /etc/apt/sources.list.d/ rsync --ignore-existing -raz trusted.gpg.d/ /etc/apt/trusted.gpg.d/ +[[ -d keyrings ]] && rsync --ignore-existing -raz keyrings/ /etc/apt/keyrings/ apt update