User setup and erlang installation
A bit fiddly, but this lets us run a realistic erlang install script from userspace, and then re-enter userspace later without wiping the installation.
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test `id -u` -ne 0
|
||||
then
|
||||
echo "$0 must be run as root."
|
||||
return
|
||||
fi
|
||||
|
||||
ROOT=test_environment
|
||||
|
||||
check_mount() {
|
||||
if mountpoint "$ROOT$1" > /dev/null
|
||||
then
|
||||
echo "$ROOT$1 already mounted."
|
||||
else
|
||||
mkdir -p "$ROOT$1"
|
||||
mount -o bind "$1" "$ROOT$1"
|
||||
fi
|
||||
}
|
||||
|
||||
check_mount /proc
|
||||
check_mount /sys
|
||||
check_mount /dev
|
||||
check_mount /dev/pts
|
||||
|
||||
Reference in New Issue
Block a user