summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrun-instance.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/run-instance.sh b/run-instance.sh
index f155648..05b9947 100755
--- a/run-instance.sh
+++ b/run-instance.sh
@@ -42,8 +42,9 @@ function check_dir {
source run-instance.local.sh || error "missing config\n"
[ -z "$PREFIX" ] && error "PREFIX is not set\n"
-# fs_basepath, fs_homepath and fs_game.
+# fs_basepath, fs_overpath, fs_homepath and fs_game.
true ${COMMON:="$PREFIX/common"}
+true ${OVER_PREFIX:="$PREFIX/over@"}
true ${HOME_PREFIX:="$PREFIX/home@"}
true ${FS_GAME:="slacker"}
@@ -72,15 +73,18 @@ fi
# Figure out all the instance-specific paths.
I="$1"
TREMDED="$TREMDED_PREFIX$I"
+OVER="$OVER_PREFIX$I"
HOME="$HOME_PREFIX$I"
CONFIG_COMMON="$CONFIG_PREFIX/common.cfg"
CONFIG_INST="$CONFIG_PREFIX/$I.cfg"
# Do some integrity checks.
-check_file "$TREMDED" "the tremded"
-check_dir "$HOME" "the home directory"
-check_file "$CONFIG_COMMON" "the common config"
-check_file "$CONFIG_INST" "the instance-specific config"
+check_file "$TREMDED" "the tremded"
+check_dir "$OVER" "the over directory"
+check_file "$OVER/$FS_GAME/game.so" "the game.so"
+check_dir "$HOME" "the home directory"
+check_file "$CONFIG_COMMON" "the common config"
+check_file "$CONFIG_INST" "the instance-specific config"
# Server configuration is done by overwiting the autogen.
cat "$CONFIG_COMMON" "$CONFIG_INST" > "$HOME/$FS_GAME/autogen_server.cfg" \
@@ -90,6 +94,7 @@ cat "$CONFIG_COMMON" "$CONFIG_INST" > "$HOME/$FS_GAME/autogen_server.cfg" \
cd "$HOME" || error "cannot chdir to %s\n" "$HOME"
"$GDB_WRAPPER" "$TREMDED" \
+set fs_basepath "$COMMON" \
+ +set fs_overpath "$OVER" \
+set fs_homepath "$HOME" \
+set fs_game "$FS_GAME" \
+set com_pipefile "pipe" \