Skip to content

Commit 1e4cf5f

Browse files
authored
Update functions
1 parent afd8fb3 commit 1e4cf5f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugins/functions

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ shout() {
2929

3030
do_mount() {
3131
local chroot_dir=$1
32-
see_for_directory "$chroot_dir/dev $chroot_dir/sys $chroot_dir/proc"
33-
if is_mounted "$chroot_dir" >>/dev/null; then
32+
points="$chroot_dir/dev $chroot_dir/sys $chroot_dir/proc"
33+
see_for_directory "$points"
34+
for mount_point in $points; do
35+
if is_mounted "$mount_point" >>/dev/null; then
3436
(
3537
$SUDO mount --rbind /dev "$chroot_dir"/dev
3638
$SUDO mount -t sysfs /sys "$chroot_dir"/sys
3739
$SUDO mount -t proc /proc "$chroot_dir"/proc
3840
) || die "Couldn't mount..."
3941
fi
42+
done
4043
}
4144

4245
is_mounted() {

0 commit comments

Comments
 (0)