Hello, having problem with crontab. If I run script from shell the script is working, but if the script is run from crontab, the script doesn't execude corectly.
dsl0=`/sbin/ifconfig -a | grep "dsl0"`
if [ -n "$dsl0" ];then
echo "dsl0 is up"
echo "`date` DSL IS UP" >> /var/log/messages
echo "dsl0 IS DOWN"
echo "`date` DSL IS DOWN" >> /var/log/messages
This checks if dsl0 interface is UP, if it's down then the script brings it UP. In /var/log/messages i can see that there is echo "`date` DSL IS DOWN" but id doesn't bring the dsl0 interface UP. So the script is execudet from crontab but it doesn't bring the interface UP.
This is my crontab with root account:
*/15 * * * * /bin/checkdsl
I'm using OpenSuse 11.1 if this make any difference.