use sudo when chroot mount
This commit is contained in:
parent
c8c521fc84
commit
3e94341f43
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ shopt -s extglob
|
|||
die() { error "$@"; exit 1; }
|
||||
|
||||
chroot_add_mount() {
|
||||
mount "$@" && CHROOT_ACTIVE_MOUNTS=("$2" "${CHROOT_ACTIVE_MOUNTS[@]}")
|
||||
sudo 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
|
||||
umount "${CHROOT_ACTIVE_MOUNTS[@]}"
|
||||
sudo umount "${CHROOT_ACTIVE_MOUNTS[@]}"
|
||||
unset CHROOT_ACTIVE_MOUNTS
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue