Ns Files Messed Up
SVisions
Join Date: 2003-08-10 Member: 19375Members
I unzipped all of the NS server files, but at the end of every line there is a "^M".
How can I fix this, did I just get a bad copy?
Doing unzip -a would remove the ^M's but understandably it says not to do that in the install instructions because it probably misinterprets and does it on some of the binaries as well.
<b>Turns out the ^M's weren't the problem, read the rest of the thread, or near the end.</b>
How can I fix this, did I just get a bad copy?
Doing unzip -a would remove the ^M's but understandably it says not to do that in the install instructions because it probably misinterprets and does it on some of the binaries as well.
<b>Turns out the ^M's weren't the problem, read the rest of the thread, or near the end.</b>
Comments
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
cat server.cfg | sed 's/^M//g' > server.cfg.new
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
That will remove all of the "^M" characters from the server.cfg file and output the results to server.cfg.new. From there you can just:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
mv server.cfg.new server.cfg
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->grep -v ^M server.cfg > server.cfg.new<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
As well, neither did it.
I'm in the middle of downloading the NS server files from another site, I think I must have got a bad zip. Too bad the download is frozen and I'm gonna have to start over <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
This isn't happening to anyone else?
I'm using OpenBSD and latest unzip from ports.
I moved the zip over to one of my linux boxes and unzipped it there, files looked fine so I moved the dir into a public webdir and did a recursive wget from the openbsd box and pulled the whole folder. The ^M's are still there.
So is it wget or vi?
edit: Opened it up in nano and the ^M's were removed and it said:
[ Read 57 lines (Converted from DOS format) ]
But the ^M's are still there even after I save it, and look at it in vi.
And of course it's in more than just the server.cfg - so I can't just go through and remove the ^M's in these files one by one.
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->Memory fault (core dumped)<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
So I was thinking it had something to do with the ^M's because the server loads fine as a TFC server for example.
And I can't use something like DOS2UNIX otherwise I would just do unzip -a when extracting NS.
Probably not the source of your problem though. I run unconverted config files.
Any other messages around the crash? what does running gdb on your core file yield?
Also, I'm not sure what you mean by running gdb on my core file.
And it strikes me as odd that the TFC server runs fine but the NS server doesn't.
HLDS version is 1110.
Here's what happens before:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->PackFile: /home/sean/hlds_l/valve/pak0.pak : models/hgibs.mdl
PackFile: /home/sean/hlds_l/valve/pak0.pak : models/agibs.mdl
Memory fault (core dumped)<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
So it happens when it loads the map.
Core was generated by `hlds'.
Program terminated with signal 11, Segmentation fault.
#0 0x480b815d in ?? ()<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
ahh. Does OpenBSD have a linux-compatibility setup like FreeBSD's? If so, does it have a compatible /proc filesystem you can mount? Perhaps the information in the stickied FreeBSD thread helps?
ahh. Does OpenBSD have a linux-compatibility setup like FreeBSD's? If so, does it have a compatible /proc filesystem you can mount? Perhaps the information in the stickied FreeBSD thread helps? <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Only thing I really found was /usr/ports/emulation/redhat - which I installed.
I haven't found anything else really.
Anyone else running a NS server on OpenBSD?
NAME
compat_linux - setup for running Linux binaries under emulation
DESCRIPTION
OpenBSD supports running Linux binaries. This only applies to i386 sys-
tems for now. Both the a.out and ELF binary formats are supported. Most
programs should work, including the ones that use the Linux SVGAlib. Ad-
ditionally, OSS audio is emulated, so Linux binaries can access the na-
tive audio transparently. <b>Programs that will not work include those that
use the Linux /proc filesystem (which is different from the optional
OpenBSD /proc filesystem)</b>, and i386-specific calls, such as enabling vir-
tual 8086 mode.
The Linux compatibility feature is active for kernels compiled with the
COMPAT_LINUX option enabled.
A lot of programs are dynamically linked. This means that the Linux
shared libraries that the programs depend on and the runtime linker are
also needed. Additionally, a "shadow root" directory for Linux binaries
on the OpenBSD system will have to be created. This directory is named
/emul/linux. Any file operations done by Linux programs run under OpenBSD
will look in this directory first. So, if a Linux program opens, for ex-
ample, /etc/passwd, OpenBSD will first try to open
/emul/linux/etc/passwd, and if that does not exist open the `real'
/etc/passwd file. It is recommended that Linux packages that include
configuration files, etc., be installed under /emul/linux, to avoid nam-
ing conflicts with possible OpenBSD counterparts. Shared libraries
should also be installed in the shadow tree.
Generally, it will only be necessary to look for the shared libraries
that Linux binaries depend on the first few times that Linux programs are
installed on the OpenBSD system. After a while, there will be a suffi-
cient set of Linux shared libraries on the system to be able to run newly
imported Linux binaries without any extra work.
Setting up shared libraries
How to get to know which shared libraries Linux binaries need, and where
to get them? Basically, there are 3 possibilities. (When following
these instructions, root privileges are required on the OpenBSD system to
perform the necessary installation steps).
1. Access to the OpenBSD ports(7) system: Install the port named
redhat/base in the emulators category. The redhat/base port con-
tains the shared libraries, binaries, and other related files neces-
sary to run Linux applications. Access to a Linux system is not
needed.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
So I guess this means I'm screwed?
I've already done what it said on the man page.
I've already done what it said on the man page. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Sounds very similar to FreeBSD's rig; you should be fine. However, under freebsd, you need to mount a linux-compatible proc filesystem. Do you have a mount type of linprocfs or something similar? See the "Freebsd and ns I got it working" thread.
I've already done what it said on the man page. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Sounds very similar to FreeBSD's rig; you should be fine. However, under freebsd, you need to mount a linux-compatible proc filesystem. Do you have a mount type of linprocfs or something similar? See the "Freebsd and ns I got it working" thread. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Read the part I set in bold of the man page quote.
I've already done what it said on the man page. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Sounds very similar to FreeBSD's rig; you should be fine. However, under freebsd, you need to mount a linux-compatible proc filesystem. Do you have a mount type of linprocfs or something similar? See the "Freebsd and ns I got it working" thread. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Read the part I set in bold of the man page quote. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Yeah, I saw that. However, one could read that as "compat_linux does not include a /proc filesystem; get one elsewhere." The only reason I suggest that is because the two are somewhat separate in FreeBSD as well.
You could...install VMware on OpenBSD, run a FreeBSD virtual machine, and run the linux-compat stuff on top of that <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->