Thread: Utility Linux Admining
View Single Post
  #38  
Old September 17th, 2009, 06:17 PM
vfb's Avatar

vfb vfb is offline
General
 
Join Date: Mar 2007
Location: Japan
Posts: 3,691
Thanks: 269
Thanked 397 Times in 200 Posts
vfb is on a distinguished road
Default Re: Linux Admining

It's probably the [] characters in $BUP, if it's calling system() to run the postexec command then it won't work, because system() does a "/bin/sh -c":

Code:
$ /bin/sh -c ["/bin/ls -a"]
/bin/sh: [/bin/ls: No such file or directory


I put my postexec commands in a script and that worked fine:

Code:
$DOM3EXE $DOM3GAME  \
        --port $PORT -ST${DEBUG} ${SCOREOPT} ${RENAMEOPT} \
        --era ${ERA} \
        --uploadmaxp ${PLAYERS} --noclientstart \
        --requiredvp 0 --totalvp 0  \
        --mapfile ${MAP} \
        --enablemod ${MOD} \
        -q \
        --masterpass ${MASTERPASS} \
        --preexec ${DOM3DIR}/prehost.sh --postexec ${DOM3DIR}/posthost.sh \
        >>$DOM3LOGDIR/$DOM3GAME.log 2>>$DOM3LOGDIR/$GAME.err
Also, do you need -g? The help for that shows:

Code:
-g  --host          Generate new turn and exit
__________________
Whether he submitted the post, or whether he did not, made no difference. The Thought Police would get him just the same. He had committed— would still have committed, even if he had never set pen to paper— the essential crime that contained all others in itself. Thoughtcrime, they called it. Thoughtcrime was not a thing that could be concealed forever.
http://z7.invisionfree.com/Dom3mods/index.php?
Reply With Quote