Possible IPcop FAH addon bug

thedude42

Limp Gawd
Joined
Nov 12, 2004
Messages
477
So, anyone checking out my previous ipcop thread might be aware, I had an issue with my IPcop box not setting me up with the correct user name and team.

Well, after pulling my hair out trying a bunch of different things for 3 hours, I finally narrowed the problem down to a problem with the pearl script in the web admin interface (at least I think it's pearl, I'm not a pearl/php or cgi scripting person in any way).

Basically, it seemed like either the script would not look in the correct location for the client.cfg file, or the script wasn't properly writting the file when you entered your username and team info on the folding page in ipcop.

As a result, you would ALWAYS have a client.cfg file set to anonymous/team 0, NO MATTER WHAT THE IPCOP FOLDING PAGE TELLS YOU. this is a problem with the folding.cgi script that is included with the install and is unaltered from download to install to run time.

So, for any fellow ipcop people out there with the addon, I reccomend you log in to ipcop and check your folding log:

more /var/ipcop/folding/FAHlog.txt

Drill through the info and check to see if you're folding for the 0 team under anonymous. Unless you did your own modifications already, it probably is.

Don't bother trying to change the client.cfg directly. The FAH core has already read the bad one, and if you restart it from the page it's just going to overwrite the file again. If you start it manually fromt he command line, as soon as you close your ssh terminal window the process gets killed. And if you try directly running foldingrestart files, for some reason it never kicks in (you might try another way, as I could ahve been doing something wrong).

What I found does work:

At the IPcop command prompt:

cd /home/httpd/cgi-bin

(I use vi, I was introduced to unix on vi. You might use you SCP client to copy the file to your machine and use notepad if you're a total windows person, as vi has a bit of a learning curve to it. that works too, just copy it over, edit it, then copy it back.)

the file you are looking for is:

folding.cgi

Right at the top you'll see some code that starts the first nested conditional ("if" statement) that starts:

if ($foldingsettings{'ACTION'} eq $Lang::tr{'save'})

If you already looked at your client.cfg, you'll see something very familiar, namely the default configuration:

[settings]
username=Anonymous
team=0
asknet=no
machineid=1

[http]
active=no
host=localhost
port=8080

[clienttype]
type=2

This is the statement in the CGI script that is reverting all your settings back to these from whatever you entered. All you have to do is change the fields for username and team to whatever you want (team 33 of course) and then save the file back.

After I did this I went back to the command prompt and typed:

httpd restart

Just to make sure the web server reloaded before going back to the folding page and starting it back up.

Now, just to make sure you did everything right, go back to your IPcop command prompt and type:

more /var/ipcop/folding/FAHlog.txt

drill down to the bottom of the log for the familiar F@H starting messages and check what it says for user/team. If it's what you just entered int eh CGI script, you're fixed!

No matter what you type in the IPcop folding page for user and pass, you will ALWAYS be folding for whatever username/team you put int he CGI script. Go ahead and play with it and find out. I invite anyone who knows CGI to look at what I have or contact me for more details so this problem can be fixed. This is a total hack, but it works.
 

RavenD

[H]ard|Gawd
Joined
Jun 30, 2005
Messages
1,516
I ran into this when I put F@H on my IPCop box. I just used ./FAH504-Linux -configonly over ssh to set the right username and team.
 

thedude42

Limp Gawd
Joined
Nov 12, 2004
Messages
477
so, that switch works while it's running? and the process continues after you exit the ssh session?
 
Top