Revert "use sudo when chroot mount"

This reverts commit 3e94341f43.
This commit is contained in:
Antoine Martin 2024-08-21 14:04:23 -04:00
parent 5f4c56c034
commit d2a55dd4e6
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -11,7 +11,7 @@ shopt -s extglob
die() { error "$@"; exit 1; }
chroot_add_mount() {
sudo mount "$@" && CHROOT_ACTIVE_MOUNTS=("$2" "${CHROOT_ACTIVE_MOUNTS[@]}")
mount "$@" && CHROOT_ACTIVE_MOUNTS=("$2" "${CHROOT_ACTIVE_MOUNTS[@]}")
}
chroot_setup() {
@ -53,7 +53,7 @@ chroot_teardown() {
# alpine-chroot kills gpg-agent, started by pacman-key, which otherwise
# keeps the mounts busy and prevents unmounting
pkill gpg-agent
sudo umount "${CHROOT_ACTIVE_MOUNTS[@]}"
umount "${CHROOT_ACTIVE_MOUNTS[@]}"
unset CHROOT_ACTIVE_MOUNTS
}