From: Rick L Bird Date: Sat, 23 Apr 2011 03:43:40 +0000 (-0400) Subject: Misc build & configuration file fixes X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=cf38245432173d4f68166bdd692183b2079b702e;p=cobramush.git Misc build & configuration file fixes --- diff --git a/game/mushcnf.dst b/game/mushcnf.dst index 76a9d67..4abda08 100644 --- a/game/mushcnf.dst +++ b/game/mushcnf.dst @@ -326,11 +326,6 @@ max_parents 10 # What's the max chain length of indirect locks allowed? max_depth 10 -# How many @functions can we have? If you change this without # doing a -# shutdown (or shutdown/reboot) immediately thereafter, you'll very likely -# crash your MUSH, so don't do that. -max_global_fns 80 - # How much does it cost a mortal to create a channel? chan_cost 1000 diff --git a/game/restart.dst b/game/restart.dst index 2a65358..64b9b3e 100644 --- a/game/restart.dst +++ b/game/restart.dst @@ -118,22 +118,21 @@ fi # # Read the cnf file and set some variables. # -INDB=`egrep "^input_database" $CONF_FILE | sed "s/.*[ ][ ]*.*\/\(.*\)/\1/" | sed 's/\r$//'` -OUTDB=`egrep "^output_database" $CONF_FILE | sed "s/.*[ ][ ]*.*\/\(.*\)/\1/" | sed 's/\r$//'` -PANICDB=`egrep "^crash_database" $CONF_FILE | sed "s/.*[ ][ ]*.*\/\(.*\)/\1/" | sed 's/\r$//'` -PANICDIR=`egrep "^crash_database" $CONF_FILE | sed "s/.*[ ][ ]*\(.*\)\/.*/\1/" | sed 's/\r$//'` +INDB=`egrep "^input_database" $CONF_FILE | sed "s/[^[:space:]][[:space:]]*.*\/\(.*\)/\1/" | sed 's/\r$//'` +OUTDB=`egrep "^output_database" $CONF_FILE | sed "s/[^[:space:]][[:space:]]*.*\/\(.*\)/\1/" | sed 's/\r$//'` +PANICDB=`egrep "^crash_database" $CONF_FILE | sed "s/[^[:space:]][[:space:]]*.*\/\(.*\)/\1/" | sed 's/\r$//'` +PANICDIR=`egrep "^crash_database" $CONF_FILE | sed "s/[^[:space:]][[:space:]]*\(.*\)\/.*/\1/" | sed 's/\r$//'` COMPRESSOR="cat" SUFFIX="" # Find out what the compression program is, if any -egrep -s "^compress_program[ ]*[A-Za-z0-9]" $CONF_FILE +egrep -s "^compress_program[[:space:]]*[[:alnum:]/]" $CONF_FILE nocompress=$? if [ "$nocompress" -eq 0 ]; then - COMPRESSOR=`egrep "^compress_program" $CONF_FILE | sed "s/[^ ]*[ ]*\(.*\)/\1/" | sed 's/\r$//'` - SUFFIX=`egrep "^compress_suffix" $CONF_FILE | sed "s/[^ ]*[ ]*\(.*\)/\1/" | sed 's/\r$//'` + COMPRESSOR=`egrep "^compress_program" $CONF_FILE | sed "s/[^[:space:]]*[[:space:]]*\(.*\)/\1/" | sed 's/\r$//'` + SUFFIX=`egrep "^compress_suffix" $CONF_FILE | sed "s/[^[:space:]]*[[:space:]]*\(.*\)/\1/" | sed 's/\r$//'` fi - #-- start up everything # Prevent double-starting things. You may need to provide a pathname for @@ -164,8 +163,13 @@ if [ -r "$PANICDIR/$PANICDB" ]; then fi fi -# Move the last set of log files to save/ -mv -f log/*.log save/ +# Copy the last set of log files to save/ with a timestamp. +TIMESTAMP=`date +%Y%m%d%H%M%S` +for log in log/*.log; do + BASE=`basename $log` + mv -f $log save/$BASE.$TIMESTAMP +done + # Copy the latest core or netmud.core to save/ if [ -r "core" ]; then @@ -176,8 +180,8 @@ if [ -r "netmud.core" ]; then fi if [ -r "data/$OUTDB$SUFFIX" ]; then - rm -f save/$INDB$SUFFIX.old - mv -f data/$INDB$SUFFIX save/$INDB$SUFFIX.old + ln -f data/$INDB$SUFFIX save/$INDB$SUFFIX.old + mv -f data/$INDB$SUFFIX save/$INDB$SUFFIX.$TIMESTAMP mv data/$OUTDB$SUFFIX data/$INDB$SUFFIX else echo "No $OUTDB$SUFFIX found." @@ -201,4 +205,4 @@ fi DATEMSK="${GAMEDIR}/getdate.template" export DATEMSK -LC_ALL=$LANG LANG=$LANG ./netmush $GAMEDIR/$CONF_FILE & +LC_ALL=$LANG LANG=$LANG ./netmush $@ --pid-file=$PIDFILE $GAMEDIR/$CONF_FILE & diff --git a/src/help.c b/src/help.c index df932d8..e14db26 100644 --- a/src/help.c +++ b/src/help.c @@ -9,6 +9,7 @@ #define _XOPEN_SOURCE 600 #include #include +#include #include #include #include