morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus
Log | Files | Refs | Submodules | README | LICENSE

commit 96f93eb4c458b6d977933d4d6ff1abfa59023063
parent cae65668599175b07252ccd314984c33d3f13021
Author: Daniel Bainton <dpb@driftaway.org>
Date:   Mon, 10 Mar 2014 13:48:27 +0200

Redo misc/run-chroot a bit (also mount /sys)

Diffstat:
Mmisc/run-chroot | 38++++++++++++++++++++++++++++----------
1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/misc/run-chroot b/misc/run-chroot @@ -1,16 +1,34 @@ #!/bin/sh -echo -n "Mounting dev... " -sudo mount -o bind /dev root/dev +if test "$1" != ""; then + root=$1 +else + root=root +fi + +echo -n "Mounting $root/dev... " +sudo mount -o bind /dev $root/dev +echo "done." +echo -n "Mounting $root/dev/pts... " +sudo mount -o bind /dev/pts $root/dev/pts +echo "done." +echo -n "Mounting $root/proc... " +sudo mount -t proc proc $root/proc +echo "done." +echo -n "Mounting $root/sys... " +sudo mount -o bind /sys $root/sys +echo "done." +echo "Chrooting $root..." +sudo chroot $root /bin/sh +echo -n "Unmounting $root/dev/pts... " +sudo umount $root/dev/pts echo "done." -echo -n "Mounting proc... " -sudo mount -t proc proc root/proc +echo -n "Unmounting $root/dev... " +sudo umount $root/dev echo "done." -echo "Chrooting..." -sudo chroot root /bin/sh -echo -n "Unmounting dev... " -sudo umount root/dev +echo -n "Unmounting $root/sys... " +sudo umount $root/sys echo "done." -echo -n "Unmounting proc... " -sudo umount root/proc +echo -n "Unmounting $root/proc... " +sudo umount $root/proc echo "done."