File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,21 @@ do_mount() {
3131 local chroot_dir=$1
3232 points=" $chroot_dir /dev $chroot_dir /sys $chroot_dir /proc"
3333 see_for_directory " $points "
34- for mount_point in $points ; do
35- if is_mounted " $mount_point " >> /dev/null; then
36- (
37- $SUDO mount --rbind /dev " $chroot_dir " /dev
38- $SUDO mount -t sysfs /sys " $chroot_dir " /sys
39- $SUDO mount -t proc /proc " $chroot_dir " /proc
40- ) || die " Couldn't mount..."
34+
35+ if ! is_mounted " $chroot_dir /dev" >> /dev/null; then
36+ shout " mounting: $chroot_dir /dev"
37+ $SUDO mount --rbind /dev " $chroot_dir " /dev
38+ fi
39+
40+ if ! is_mounted " $chroot_dir " /proc >> /dev/null; then
41+ shout " mounting: $chroot_dir /proc"
42+ $SUDO mount -t proc /proc $chroot_dir /proc
43+ fi
44+
45+ if ! is_mounted " $chroot_dir " /sys >> /dev/null; then
46+ shout " mounting: $chroot_dir /sys"
47+ $SUDO mount -t sysfs /sys " $chroot_dir " /sys
4148 fi
42- done
4349}
4450
4551is_mounted () {
You can’t perform that action at this time.
0 commit comments