Click to See Complete Forum and Search --> : crontab not like 1 (most importnat) line


Gaccm
12-18-2000, 03:28 AM
ok, i set up crontab and everything works! except for a line (i think). what my crontab does is at 4am, disconnect from internet, shutdown firewall and reconnect soon after (i have dynamic dsl, get discconected if on for 48 (or something) hours straight) here is a copy of (root's) crontab:
SHELL=/bin/bash
5 2 * * * /usr/bin/updatedb
5 4 * * * /usr/sbin/adsl-stop
7 4 * * * /sbin/ifconfig eth0 0.0.0.0 up -arp
8 4 * * * /usr/sbin/adsl-start
9 4 * * * /usr/local/pmfirewall/pmfirewall start
i know the first 2 lines work and the last line. I had been using the sh shell, but it screwed up on ifconfig, so i changed it to bash. but it never seems to connect to the internet (2nd last line) and i have no clue way, any help?

Gaccm
12-18-2000, 05:23 AM
i also am not sure about the ifconfig line, but since i've already run it (on computer boot up) it shouldn't matter if it runs at all.

mdwatts
12-18-2000, 12:21 PM
Does everything work when issuing from the commandline one at a time? You did test the scripts manually first... and all was well?

I'm not a cron expert, but could you try putting the ifconfig eth0 0.0.0.0 up -arp in a exececutable script and have cron call the script to run instead of passing the arguments to ifconfig from within cron?

Like I said, I'm only guessing.

Gaccm
12-18-2000, 03:34 PM
thanks for the suggestion, i'll try putting it all in a script, and yes they work individually put in from the command line.