
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.
21 lines
266 B
Bash
Executable File
21 lines
266 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test `id -u` -ne 0
|
|
then
|
|
echo "$0 must be run as root."
|
|
return
|
|
fi
|
|
|
|
ROOT=test_environment
|
|
|
|
if test -e "$ROOT"
|
|
then
|
|
echo "Using existing environment in $ROOT."
|
|
else
|
|
./create_environment
|
|
fi
|
|
|
|
./mountpoints
|
|
|
|
chroot "$ROOT" sudo -iu user "$@"
|