From 09acae397c28d8e5b824ed9ee630a95e3a8f8b05 Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Sun, 3 Jun 2012 13:33:16 +0100 Subject: [PATCH] Fixes #13 thanks to @Jonek01 for spotting the problem. --- init/msm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/init/msm b/init/msm index 92876e3..7c8c3d7 100755 --- a/init/msm +++ b/init/msm @@ -1499,12 +1499,12 @@ init() { num_worlds=0 num_servers=0 - local server_id=0 - while IFS= read -r -d $'\0' server_path; do - local name=$(basename $server_path) - server_init $server_id $name - server_id=$(($server_id+1)) - num_servers=$server_id + local id=0 + while IFS= read -r -d $'\0' path; do + local name=$(basename $path) + server_init $id $name + id=$(($id+1)) + num_servers=$id done < <(find "$SERVER_STORAGE_PATH" -mindepth 1 -maxdepth 1 -type d -print0) }