ports

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

commit c7841a0f772838797669273f8bb866e1544ef345
parent 7a1a3d03d532acc95c35f1c5657cb38642cac39c
Author: sin <sin@2f30.org>
Date:   Thu, 29 May 2014 17:25:57 +0100

Add enter-emul

Diffstat:
Afs/bin/enter-emul | 34++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+), 0 deletions(-)

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