FON Boards Forum Index FON Boards
The Fonero meeting point
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gpl heartbeat script for non official firmware
Goto page Previous  1, 2, 3, 4, 5, 6 ... 11, 12, 13  Next
 
Post new topic   Reply to topic    FON Boards Forum Index -> Community Help
View previous topic :: View next topic  
Author Message
mathsped
Fonero A


Joined: 24 Jul 2006
Posts: 44
Location: Denmark

PostPosted: Mon Aug 07, 2006 17:52    Post subject: Reply with quote

Hey Ho Freddy !!

It's working nicely here, and finally got rid of the annoying"running advanced firmware" and can now add friends etc. Cool

Well done mate Very Happy And well done to all of you who contributed !! Razz
_________________
We are not pshychics, with 99% certainty - (c) FON
Router: Linksys WRT54-GL v.1.1 SSID: fon.com_free.wifi
Firmware: DD-WRT v23 SP1- Final (06/06/06) std ("FON compliant")
24/7 for ALL FONeros
Status: linus
Wireless device: PDA iPaq 4150
Back to top
View user's profile Send private message
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Mon Aug 07, 2006 20:11    Post subject: Reply with quote

Hello Freddy,

what is the difference between the "start" mode and the "cron" mode ?

I think there is an error in your readme. I had to put "/jffs/thinclient.sh start >> /var/log/thinclient.log 2>&1" into my startscript, otherwise it won't start without the .sh extension.
After that I checked my /tmp/crontab but there is no cron job inside.
The thinclient.log is created and the entry to known_hosts added.

What could be a reason that the entry is missing in crontab ?
When I start /jffs/thinclient.sh start after the first start done by the startup script manually, I get my cron entry. I don't understand this. The same with the first time per hand without startup script, no problem.

When the entry in the crontab had been added... need cron be restarted to read the new entry or will it happen automatically ?

By the way ... I think your skript is great leap forward Very Happy Very Happy Very Happy but I have this little problem.
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:
Back to top
View user's profile Send private message
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Mon Aug 07, 2006 20:37    Post subject: Reply with quote

ehh, linux dosn't care about file extensions, the file should be called thinclient, just make sure it's executable (chmod)

on boot (start) all information are sent to the fon server, on cron it's less information and there's a random sleep (to avoid ddos on FON servers. And only on start it will check for the crontab line.

which version on dd-wrt you're using? you can try to just remove the if for the cron line and add it allways (don't call start after boot then Wink)
Back to top
View user's profile Send private message Visit poster's website
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Mon Aug 07, 2006 20:52    Post subject: Reply with quote

Freddy wrote:
ehh, linux dosn't care about file extensions, the file should be called thinclient, just make sure it's executable (chmod)

which version on dd-wrt you're using? you can try to just remove the if for the cron line and add it allways (don't call start after boot then Wink)


Hello Freddy,
I use build V23 SP1 standard 060606 (Brainslayer build without KAID)

If I have in COMMANDS/STARTUP this :
Code:
/jffs/thinclient start >> /var/log/thinclient.log 2>&1


I get this result in the thinclient log:
Code:
/tmp/.rc_startup: /tmp/.rc_startup: 3: /jffs/thinclient: not found


If I have in COMMANDS/STARTUP this :
Code:
/jffs/thinclient.sh start >> /var/log/thinclient.log 2>&1


I get this result in the thinclient log:
Code:
cat: /tmp/root/.ssh/known_hosts: No such file or directory
Thu Jan  1 00:00:21 UTC 1970: mode='start' wlmac='00:12:17:d4:66:5c' mac='00:12:17:D4:66:5A' fonrev='1' firmware='0.6.6' chillver='1.0-1' thclver='1.0'


If I execute the thinclient.sh start in rc_startup crontab looks like this :
Code:
PATH=/sbin:/bin:/usr/sbin:/usr/bin


If I execute thinclient.sh start with putty crontab looks like this :
Code:
PATH=/sbin:/bin:/usr/sbin:/usr/bin

0   *   *   *   *   root /jffs/thinclient cron >> /var/log/thinclient.log


I can't imagine the reason why this is different Question Question


--->schnipp <----
THE PROBLEM WAS THAT I RENAMED thinclient to thinclient.sh After renaming the file it looks better.
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:


Last edited by fulbrich on Tue Aug 08, 2006 20:50; edited 3 times in total
Back to top
View user's profile Send private message
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Mon Aug 07, 2006 22:16    Post subject: Reply with quote

really strange.

Did you rename the file?
I would try to add e.g.
ls /jffs/ > /tmp/ls.log
to the startup script, can you mail me the firmware .bin? (files@freddy.eu.org)
Back to top
View user's profile Send private message Visit poster's website
mathsped
Fonero A


Joined: 24 Jul 2006
Posts: 44
Location: Denmark

PostPosted: Mon Aug 07, 2006 23:11    Post subject: Reply with quote

Hmmm... guess I should've checked my crontab as well...


Mine is the same as fulbrich's except that I with
Code:
/jffs/thinclient start >> /var/log/thinclient.log 2>&1


the thinclient.log looks like this:
Code:
/tmp/var/log # cat thinclient.log
cat: /tmp/root/.ssh/known_hosts: No such file or directory
Mon Aug  7 23:50:18 UTC 2006: mode='start' wlmac='xx:xx:xx:xx:xx:a8' mac='xx:xx:xx:xx:A6' fonrev='1' firmware='0.6.6' chillver='1.0-1' thclver='1.0'


Added ls /jffs/ > /tmp/ls.log to the startup and this is what's inside ls.log
fonkey
thinclient
tmp

And I did chmod thinclient

Code:
/jffs # ls -l
-rw-r--r--    1 root     root          459 Aug  7 18:11 fonkey
-rwxr-xr-x    1 root     root         1964 Aug  7 18:13 thinclient
drwxr-xr-x    1 root     root            0 Aug  6 08:31 tmp



Btw: I'm using the same version of firmware as fulbrich.
_________________
We are not pshychics, with 99% certainty - (c) FON
Router: Linksys WRT54-GL v.1.1 SSID: fon.com_free.wifi
Firmware: DD-WRT v23 SP1- Final (06/06/06) std ("FON compliant")
24/7 for ALL FONeros
Status: linus
Wireless device: PDA iPaq 4150
Back to top
View user's profile Send private message
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Tue Aug 08, 2006 07:15    Post subject: Reply with quote

something must be different, I didn't get a firmware mail up to now, and I can't find on dd-wrt.com
Back to top
View user's profile Send private message Visit poster's website
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Tue Aug 08, 2006 07:52    Post subject: Reply with quote

Freddy wrote:
something must be different, I didn't get a firmware mail up to now, and I can't find on dd-wrt.com


Hi Freddy,
you are right. I renamed thinclient to thinclient.sh - That was the error.
I renamed it back to thinclient and I get an entry in crontab. I will doublecheck it this afternoon. It looks betternow. Anyway I will send you my firmware in a minute.

---->schnipp<----

Everything is fine. After changing back the name of the thinclient script it works fine. :

thinclient.log
Code:
cat: /tmp/root/.ssh/known_hosts: No such file or directory
Tue Aug  8 16:51:16 UTC 2006: mode='start' wlmac='00:16:...' mac='00:16:...' fonrev='1' firmware='0.6.6' chillver='1.0-1' thclver='1.0'
Tue Aug  8 17:17:27 UTC 2006: mode='cron' wlmac='00:16:...' mac='00:16:...' fonrev='1' firmware='0.6.6'
Tue Aug  8 18:53:45 UTC 2006: mode='cron' wlmac='00:16:...' mac='00:16:...' fonrev='1' firmware='0.6.6'


crontab :
Code:
PATH=/sbin:/bin:/usr/sbin:/usr/bin

0   *   *   *   *   root /jffs/thinclient cron >> /var/log/thinclient.log


In my case everything is fine. Thanks for you help, Freddy.
I start your script by the rc_startup :
Code:
/jffs/thinclient start >> /var/log/thinclient.log 2>&1


Freddy, I think you did a pretty good job by programming this script.
Thank you very much. I use this software with the firmware, I send to you - the firmware without kaid.
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:


Last edited by fulbrich on Tue Aug 08, 2006 20:49; edited 2 times in total
Back to top
View user's profile Send private message
mathsped
Fonero A


Joined: 24 Jul 2006
Posts: 44
Location: Denmark

PostPosted: Tue Aug 08, 2006 10:06    Post subject: Reply with quote

I still don't get an entry in crontab...

Did you run it manually, or via the startup this time ?

Changed anything in the script ?

Did mode change from "start" to "cron" in the thinclient.log ?

Will have a closer look at the script and my own setup of the firmware..

Just wonder if there has been a change with cron in SP2 from SP1 std 06/06/06
_________________
We are not pshychics, with 99% certainty - (c) FON
Router: Linksys WRT54-GL v.1.1 SSID: fon.com_free.wifi
Firmware: DD-WRT v23 SP1- Final (06/06/06) std ("FON compliant")
24/7 for ALL FONeros
Status: linus
Wireless device: PDA iPaq 4150


Last edited by mathsped on Tue Aug 08, 2006 11:44; edited 2 times in total
Back to top
View user's profile Send private message
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Tue Aug 08, 2006 11:09    Post subject: Reply with quote

I have too no crontab entry .
I'm investigatig .
For live discussions you can contact me with skype at the end of the signature
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Tue Aug 08, 2006 13:28    Post subject: Reply with quote

I added a sleep 10 and checks for the files to the script, it's working fine now with SP1, just reload it
Back to top
View user's profile Send private message Visit poster's website
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Tue Aug 08, 2006 13:43    Post subject: Reply with quote

Ciao Freddy.
As a workaround , I made a modification to your script as follows .
Code:
[ `cat /tmp/crontab|grep -c thinclient` == "0" ] && echo "0   *   *   *   *   
root /jffs/thinclient cron >> /var/log/thinclient.log" >> /tmp/cron.d/thinclient_cron


And it worked in sp1.

Now I'm going to put your script and check if it's good too.
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
dozzer
Fonero Pub A


Joined: 27 Jun 2006
Posts: 152

PostPosted: Tue Aug 08, 2006 13:51    Post subject: Reply with quote

THis looks like the thread to ask...

How do I run a script on the Fon firmware 0.6.6 everytime it boots ?
(It's regards IPTABLES)
Am I right in thinking it could go here: /etc/firewall.user

Will this survive a FON reboot ?
_________________
-----------
FON Sux!!!
-----------


Last edited by dozzer on Tue Aug 08, 2006 17:22; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Tue Aug 08, 2006 14:29    Post subject: Reply with quote

Final get working with dd-wrt v23 sp.1 special version provided by fulbrich.

Just follow the instructions of freddy , and modified the exec_start_mode part of the thinclient script.

I put a sleep 60 , as i need at least 45 seconds before boot and authenticate with PPPoA with my dsl line. Users behind dsl routers or PPPoE modems can decrease or wipe out the sleep time.

I must wait 16.00 CET + urandom time to see if cron will make it's dirty work Smile

if you want you can download the script here:
http://turbolearco.ath.cx/thinclient
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
j_palito
Fonero


Joined: 21 Jul 2006
Posts: 29

PostPosted: Tue Aug 08, 2006 18:26    Post subject: got error... :cry: Reply with quote

i git this error:
Code:
/jffs # ./thinclient start
[: ==: unknown operand
Do you have any idea what this is?

but then, it simply displays
Code:
Tue Aug  8 19:21:43 UTC 2006: mode='start' wlmac='xx:xx:xx:xx:xx:B4' mac='xx:xx:xx:xx:xx:B2' fonrev='1' firmware='0.6.6' chillver='1.0-1' thclver='1.0'
/jffs #
after wich i run:
Code:
/jffs # ./thinclient cron
and get again:
Code:
[: ==: unknown operand
and get:
Code:
Tue Aug  8 19:26:07 UTC 2006: mode='cron' wlmac='xx:xx:xx:xx:xx:B4' mac='xx:xx:xx:xx:xx:B2' fonrev='1' firmware='0.6.6'
/jffs #
Back to top
View user's profile Send private message
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Tue Aug 08, 2006 20:07    Post subject: Reply with quote

you can try to replace all "==" with just "=", which firmware you're using?
Back to top
View user's profile Send private message Visit poster's website
AustinTX
FON-FRIENDS


Joined: 24 Feb 2006
Posts: 2736
Location: Austin, Texass

PostPosted: Tue Aug 08, 2006 20:52    Post subject: Reply with quote

If you pasted your scripts into vi from notepad, you may have some ' and " characters or others changed. Comb over those scripts to make sure there aren't any extra characters or ^M at the end. Idea
_________________
Well, as Revolutions go, this one has certainly been revolting! Wink
Linus || WRT54GL @ 228Mhz || DD-WRT v24 Beta (05/16/07) vpn
My background: ISP NOC Tech, DSL - ISDN - Dialup - Web Hosting
[ El Fon Blog ][ RSS Feed ][ skype:elfonblog ][ gizmo:therealelfonblog ]
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Tue Aug 08, 2006 20:58    Post subject: Reply with quote

mathsped wrote:
I still don't get an entry in crontab...

Did you run it manually, or via the startup this time ?

Changed anything in the script ?

Did mode change from "start" to "cron" in the thinclient.log ?

Will have a closer look at the script and my own setup of the firmware..

Just wonder if there has been a change with cron in SP2 from SP1 std 06/06/06


With rc_startup
No, latest version 1.0.1
No
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:


Last edited by fulbrich on Tue Aug 08, 2006 21:31; edited 1 time in total
Back to top
View user's profile Send private message
j_palito
Fonero


Joined: 21 Jul 2006
Posts: 29

PostPosted: Tue Aug 08, 2006 21:13    Post subject: Reply with quote

removed the only extra = i found and no error!
Thanks, Freddy! Let's see now if this worx...
version? DD-WRT v23 SP1 Final (05/16/06) mini! Very Happy
No Austin, i don't use notepad. i use wget... (call me lazy!)

BTW, wait for my Mattle Juicebox to arrive and I'll write a hell of a topic! Wink just bought it!
BTW2, does eny one know where to buy electronics parts like an SD/MMC slot but with the right shipping? i could buy one fo $1.35 but shipping is $32!!! And i can't find them here in portugal, not even a broken card reader!
Back to top
View user's profile Send private message
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Wed Aug 09, 2006 08:24    Post subject: Reply with quote

http://fon.freddy.eu.org/dd-wrt/

Hello,
I decided to publish the version of DD-WRT which I use.
It is a compiled version without KIAD which gives you more space to write to the /jffs partition.

Version : "DD-WRT v23 SP1 std generic" compiled on 06/06/2006

(BS renamed his compilation of this Version with KAID from SP1 to SP2
http://www.dd-wrt.com/dd-wrtv2/downloads/untested_alpha_unstable/dd-wrt.v23 SP2)

I guess my version is the same above but WITHOUT Kaid.
Freddy put this KAID-less version onto his webserver.
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    FON Boards Forum Index -> Community Help All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6 ... 11, 12, 13  Next
Page 5 of 13

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


© FON | Please observe Nettiquette | RSS XML RSS feed of the last messages posted | Powered by phpBB © 2001, 2005 phpBB Group