Created
October 12, 2016 23:09
-
-
Save Duncaen/aa8937bdb50ea9ef347a5e14aeec0214 to your computer and use it in GitHub Desktop.
plan9.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| binds=" | |
| mkdir -p usr/bin usr/lib; | |
| mount -v --bind /usr/lib/ usr/lib; | |
| mount -v --bind /usr/bin/ usr/bin; | |
| ln -sf usr/lib lib; | |
| ln -sf usr/bin bin; | |
| touch dev/tty2 | |
| chmod 600 dev/tty2 | |
| mount -v --bind /dev/tty2 dev/tty2; | |
| " | |
| tmp=$(mktemp -d /tmp/plan9-XXXXXX) | |
| contain -i "$binds" "$tmp" /usr/lib/plan9/bin/9 rc | |
| rm -rf "$tmp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment