From 19d1fe92e846aa2b6a8c0fa2abe1c6d526dfae5a Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Wed, 27 Dec 2017 10:39:38 +0000 Subject: Add support for fs_overpath. --- run-instance.sh | 15 ++++++++++----- 1 file 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" \ -- cgit