From 3cc6e5a40e2ef8e41204798b14d848d5f94ccee3 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 17 Jun 2024 11:37:25 +0200 Subject: [PATCH] shellcheck fixes, fix chroot tarball --- usr/lib/archboot/common.sh | 2 +- usr/lib/archboot/run/chroot-tarball.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/usr/lib/archboot/common.sh b/usr/lib/archboot/common.sh index 9cc457155..398868172 100644 --- a/usr/lib/archboot/common.sh +++ b/usr/lib/archboot/common.sh @@ -315,7 +315,7 @@ _pacman_keyring() { done # gpg finished in background while pgrep -x gpg &>"${_NO_LOG}"; do - read .r -t 1 + read -r -t 1 done if [[ -e /etc/systemd/system/pacman-init.service ]]; then systemctl stop pacman-init.service diff --git a/usr/lib/archboot/run/chroot-tarball.sh b/usr/lib/archboot/run/chroot-tarball.sh index 31a0287dd..7a01d974f 100755 --- a/usr/lib/archboot/run/chroot-tarball.sh +++ b/usr/lib/archboot/run/chroot-tarball.sh @@ -65,9 +65,10 @@ rm -r "${1}" echo "Finished container tarball." echo "Signing tarball..." #shellcheck disable=SC2086 -sudo -u "${_USER}" gpg ${_GPG} ${_PACMAN_ARCH_CHROOT} || exit 1 +run0 "${_USER}" gpg ${_GPG} ${_PACMAN_ARCH_CHROOT} || exit 1 chown "${_USER}":"${_GROUP}" "${_PACMAN_ARCH_CHROOT}"{,.sig} || exit 1 echo "Syncing tarball to ${_SERVER}:${_PUB}/.${_SERVER_PACMAN_ARCH}..." -sudo -u "${_USER}" "${_RSYNC}" "${_PACMAN_ARCH_CHROOT}"{,.sig} "${_SERVER}:${_PUB}/.${_SERVER_PACMAN_ARCH}" || exit 1 +#shellcheck disable=SC2086 +run0 "${_USER}" ${_RSYNC} "${_PACMAN_ARCH_CHROOT}"{,.sig} "${_SERVER}:${_PUB}/.${_SERVER_PACMAN_ARCH}" || exit 1 echo "Finished." # vim: set ft=sh ts=4 sw=4 et: