ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

enter-emul (698B)


      1 #!/bin/sh
      2 
      3 if test -z "$1"; then
      4 	root="/emul"
      5 else
      6 	root="$1"
      7 fi
      8 
      9 echo -n "Mounting $root/dev... "
     10 mount -o bind /dev $root/dev
     11 echo "done."
     12 echo -n "Mounting $root/dev/pts... "
     13 mount -o bind /dev/pts $root/dev/pts
     14 echo "done."
     15 echo -n "Mounting $root/proc... "
     16 mount -t proc proc $root/proc
     17 echo "done."
     18 echo -n "Mounting $root/sys... "
     19 mount -o bind /sys $root/sys
     20 echo "done."
     21 echo "Chrooting $root..."
     22 chroot $root /bin/sh
     23 echo -n "Unmounting $root/dev/pts... "
     24 umount $root/dev/pts
     25 echo "done."
     26 echo -n "Unmounting $root/dev... "
     27 umount $root/dev
     28 echo "done."
     29 echo -n "Unmounting $root/sys... "
     30 umount $root/sys
     31 echo "done."
     32 echo -n "Unmounting $root/proc... "
     33 umount $root/proc
     34 echo "done."