I am trying to get the Battlefield 2 dedicated server running on a FreeBSD 5.4 machine on my home network for some fun with my uni housemates.
I downloaded the dedicated server installer straight from EAGames this morning, so I should in theory have the latest version.
I have installed the linux_base-rh-9 port and also installed bash2 as well because I know that Linux machines have that as the /bin/sh whereas FreeBSD uses csh as /bin/sh
When I try to install the server, I 'accept' and 'yes' for it (dont know if I really need punkbuster though, but also trying this with 'no' doesnt really make much difference)
I have examined the man pages of test in both FreeBSD and Linux and as far as I can tell both use the -a switch to perform an AND operation
I have since tried it using
./bf2-linuxded-1.1.2484.0-installer.sh --target tmp
so this extracts the files into a folder called tmp in the current directory.
reading through the license.sh I have found on line 59
if test -a "$TARGET/bf2"; then
this is obviously not an AND operation, I am assuming that it might need to be -e instead to test for the existence of that directory
the cp lines, well looking around line 76 there is this
it looks like the case statement is the part causing the problem at least on my system.
in FreeBSD the uname -m command gives 'amd64', I dont have access to any Linux amd64 servers to check what their uname -m gives though I would assume it to be x86_64
Making these changes and then running ./license.sh from the tmp folder allows me to properly install the server, but then attempting to run ./start.sh I get the following error
$ ./start.sh
ELF binary type "0" not known.
/usr/home/battlefield/BF2/bf2/bin/bf2: 1: Syntax error: "(" unexpected
Any ideas about how I can get this to work, and please do not tell me to install Windows or Linux on the server instead of FreeBSD.
Thanks in advance for any help
I downloaded the dedicated server installer straight from EAGames this morning, so I should in theory have the latest version.
I have installed the linux_base-rh-9 port and also installed bash2 as well because I know that Linux machines have that as the /bin/sh whereas FreeBSD uses csh as /bin/sh
When I try to install the server, I 'accept' and 'yes' for it (dont know if I really need punkbuster though, but also trying this with 'no' doesnt really make much difference)
Code:
I then come to this point in the installation and get this output. The target installation directory is where the bf2 directory will be created and must be an existing directory. Enter your target installation directory: /usr/home/battlefield/BF2 test: -a: unexpected operator Installing BF2 to /usr/home/battlefield/BF2/bf2... cp: bin//libdice_py.so: No such file or directory cp: bin//libaidll.so: No such file or directory cp: bin//bf2: No such file or directory Installing PunkBuster... cp: pb_: No such file or directory mv: rename /usr/home/battlefield/BF2/bf2/pb_ to /usr/home/battlefield/BF2/bf2/pb: No such file or directory Installation complete.
I have since tried it using
./bf2-linuxded-1.1.2484.0-installer.sh --target tmp
so this extracts the files into a folder called tmp in the current directory.
reading through the license.sh I have found on line 59
if test -a "$TARGET/bf2"; then
this is obviously not an AND operation, I am assuming that it might need to be -e instead to test for the existence of that directory
the cp lines, well looking around line 76 there is this
Code:
MACH=""
case `uname -m` in
i[3456]86) MACH="ia-32"
;;
x86_64) MACH="amd-64"
;;
esac
echo Installing BF2 to "$TARGET/bf2"...
cp -r \
admin \
adminutils \
mods \
python \
readmes \
pylib-2.3.4.zip \
rotate_demo.cfg \
lowercaseDir.py \
start.sh \
"$TARGET/bf2"
mkdir "$TARGET/bf2/bin"
cp "bin/$MACH/bf2" "bin/$MACH/libaidll.so" "bin/$MACH/libdice_py.so" "$TARGET/bf2/bin"
if [ "$PB" = 'yes' ]; then
echo Installing PunkBuster...
cp -r pb_$MACH "$TARGET/bf2";
mv "$TARGET/bf2/pb_$MACH" "$TARGET/bf2/pb"
fi
in FreeBSD the uname -m command gives 'amd64', I dont have access to any Linux amd64 servers to check what their uname -m gives though I would assume it to be x86_64
Making these changes and then running ./license.sh from the tmp folder allows me to properly install the server, but then attempting to run ./start.sh I get the following error
$ ./start.sh
ELF binary type "0" not known.
/usr/home/battlefield/BF2/bf2/bin/bf2: 1: Syntax error: "(" unexpected
Any ideas about how I can get this to work, and please do not tell me to install Windows or Linux on the server instead of FreeBSD.
Thanks in advance for any help
Comment