Browse Source

adding mount check for chroot methode

pull/1/head
Markus Bergholz 6 years ago
parent
commit
049a934f71
1 changed files with 13 additions and 7 deletions
  1. +13
    -7
      superchroot

+ 13
- 7
superchroot View File

@@ -27,11 +27,13 @@ set_chroot (){

elif [[ "$option" = "chroot" ]]; then
printf "forcing chroot method...\n\n"
mount -t devtmpfs /dev $folder/dev
mount -t devpts /dev/pts $folder/dev/pts
mount -t sysfs /sys $folder/sys
mount -t proc /proc $folder/proc
chroot $folder $terminal
if mount | grep $folder/dev > /dev/null; then
chroot $folder $terminal
else
chroot_mount "$folder"
chroot $folder $terminal
fi


elif [[ "$option" = "arch" ]]; then
printf "forcing arch-chroot method...\n\n"
@@ -69,8 +71,12 @@ super_chroot(){

else
printf "\nRunning classic chroot with mount -t... \n\n"
chroot_mount "$folder"
chroot $folder $terminal
if mount | grep $folder/dev > /dev/null; then
chroot $folder $terminal
else
chroot_mount "$folder"
chroot $folder $terminal
fi
fi
fi



Loading…
Cancel
Save