Whenever i try to startup the mud using ./startup &
I recieve this error... im clueless when it comes to the startup part of SMAUG, any suggestions guys?
dreamer@dreams.slayn.net [~/SMAUG/src]# ./startup: line 4: syntax error near unexpected token `set'
'/startup: line 4: `if ( "$1" != "" ) set port="$1"
my startup is the following:
#! /bin/csh -f
# Set the port number.
set port = 6767
if ( "$1" != "" ) set port="$1"
# Change to area directory.
cd ../area
# Set limits.
limit coredumpsize unlimited
limit stacksize unlimited
if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 )
# If you want to have logs in a different directory,
# change the 'set logfile' line to reflect the directory name.
set index = 1000
while ( 1 )
set logfile = ../log/$index.log
if ( ! -e $logfile ) break
@ index++
end
# Record starting time
date > $logfile
date > ../area/boot.txt
# Run SMAUG.
# Check if already running
set matches = `netstat -an | grep ":$port " | grep -c LISTEN`
if ( $matches >= 1 ) then
# Already running
echo Port $port is already in use.
exit 0
endif
../src/smaug $port >&! $logfile
# Restart, giving old connections a chance to die.
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 5
end
You might not have tcsh installed. I'm assuming you are running under Linux from the prompt hostname; if you have a Debian-based system, you should do "apt-get install tcsh". From a Fedora system, it'd be something like "yum install tcsh".
I suspect that you have the basic csh installed and it doesn't like the syntax in line 4.
You don't want to touch the first line; it's fine as it is. If anything csh should be changed to tcsh, but no more spaces are necessary.
Try typing csh --version or csh -v or something like that to get the version of csh that's running. If it says csh and not tcsh that is probably the problem.
Which distribution is this startup script from? Did you change anything whatsoever? Is the startup script exactly the same as the one in the distribution archive? Have you tried other distributions?
Ok... either i've done this completely wrong. Or i've just recieved the same message in GDB. Sorry if its me ::twitch::
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
Did you compile the code from scratch on the server you're running on? If you compiled it on a home machine and then uploaded it, there might be machine architecture problems. Or C library problems. Or something. In any case, it's a good idea to recompile on the server.
Yeh, i cleaned up all the *.o files before i uploaded it to the host. Then compiled it when i was over there, i had to modifiy the makefile abit to work on the host, but then i thought everything would have been ok.
I typed in:
./startup &
cd ..
cd area
gdb ../src/smaug
waited for the error
backtrack
q
ps
kill 3102
Uh... You're running two MUDs then. There's no need to start the startup script if you are going to run the MUD via gdb. You also didn't run the MUD. When you enter gdb, type run.
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
meh, im so sorry bout bein such a pain in the ass :| these scripts are something im crap at... coding, i can do (to a point i might add). scripts... meh :|
#0 0x001697a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x001a97a5 in raise () from /lib/tls/libc.so.6
#2 0x001ab209 in abort () from /lib/tls/libc.so.6
#3 0x001dd71a in __libc_message () from /lib/tls/libc.so.6
#4 0x001e3fbf in _int_free () from /lib/tls/libc.so.6
#5 0x001e433a in free () from /lib/tls/libc.so.6
#6 0x001d4746 in fclose@@GLIBC_2.1 () from /lib/tls/libc.so.6
#7 0x0810473b in load_projects () at db.c:6929
#8 0x080f4ea4 in boot_db (fCopyOver=0 '\0') at db.c:704
#9 0x080e9ed2 in main (argc=1, argv=0xbfefccd4) at comm.c:533
(gdb)
Is it fine now? What does your projects.dat file (or whatever it is) look like? Perhaps that was corrupt. Because I've run Smaug 1.8 and it doesn't have this issue.