From 4e1842b87bb2a6336e3e11deeb8b7407de1f4dce Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 1 Sep 2021 16:02:48 +1000 Subject: Strip some more boiler plate from the .shini files. --- src/sledjchisl/sledjchisl.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 4aeea41..8a686fa 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -1535,6 +1535,14 @@ simList *getSims() " -e '/LogFile.*/d'" " -e '/StatsLogFile.*/d'" " -e '/ConsoleHistoryFile.*/d'" + " -e '/InternalPort.*/d'" + " -e '/MaxAgents.*/d'" + " -e '/PhysicalPrimMax.*/d'" + " -e '/NonphysicalPrimMax.*/d'" + " -e '/ClampPrimSize.*/d'" + " -e '/MaptileStaticUUID.*/d'" + " -e '/\\[Network\\].*/d'" + " -e '/http_listener_port.*/d'" " %s >%s", name, path, newPath); V("Converting %s.ini -> %s", path, newPath); @@ -1861,25 +1869,22 @@ void prepSims(simData *simd, char *sim, char *type, int count, int window, int p simd->portU = startPort + 3 + count * 2; cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" " -e 's@\\[Region\\]@" - " paneID = \"\\%s\"\\n" + " paneID = \"\\%s\"\\n\\n" "\\[Startup\\]\\n" " PIDFile = \"\\$\\{Paths\\|PIDPath\\}\\/\\$\\{Const\\|mysim\\}\\.pid\"\\n" " LogFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSim_\\$\\{Const\\|mysim\\}\\.log\"\\n" " StatsLogFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSimStats_\\$\\{Const\\|mysim\\}\\.log\"\\n" " ConsoleHistoryFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSimConsoleHistory_\\$\\{Const\\|mysim\\}\\.txt\"\\n" - "\\n\\[Region\\]@'" - " -e 's/InternalPort[[:space:]]*=[[:space:]]*[[:digit:]]+/InternalPort = %d/'" - " -e 's/InternalPort[[:space:]]*=[[:space:]]*\"[[:digit:]]+\"/InternalPort = %d/'" - " -e 's/http_listener_port[[:space:]]*=[[:space:]]*[[:digit:]]+/http_listener_port = %d/'" - " -e 's/http_listener_port[[:space:]]*=[[:space:]]*\"[[:digit:]]+\"/http_listener_port = %d/'" + "\\n\\[Network\\]\\n" + " http_listener_port = %d\\n" + "\\n\\[Region\\]\\n" + " InternalPort = %d@'" " %s >%s", scTemp, count, scTemp, count, simd->paneID, - simd->portU, - simd->portU, - simd->portH, simd->portH, + simd->portU, path, newPath); D("Writing .ini file %s with ports %d %d", newPath, simd->portH, simd->portU); if (shellMeFail(cmd)) -- cgit v1.1