DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-01-08 16:08:18

glenndm
New member
Registered: 2009-01-08
Posts: 2

problem: crontab using different environment to login

Hi,

I'm struggling with a crontab run script on dns-323, expanded with funplug

when I login with ssh to the device and run the script, it works.
I then added the script to crontab, only to find the script failed with numerous errors.

the errors were due to the fact that the crontab launched version apparently used the older non-funplug commands.

examples:
login: value of PATH='/ffp/bin:/usr/bin:/bin'
crontab:value of path PATH='/usr/bin:/bin:/usr/sbin:/sbin'

Code:

login:  cp --help
BusyBox v1.12.1 (2008-09-29 20:38:04 CEST) multi-call binary

Code:

crontab: cp --help
BusyBox v1.00-pre1 (2007.12.10-08:03+0000) multi-call binary

What must I do so crontab launched scripts use the same environment as regular logins?

For now, I'll try using PATH in the scripts to force the use of funplug updated commands.

best regards
glenn

Offline

 

#2 2009-01-08 16:53:05

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: problem: crontab using different environment to login

glenndm wrote:

What must I do so crontab launched scripts use the same environment as regular logins?

You can include the full path to the to the ffp commands you want to use in the scripts

Code:

/ffp/bin/cp --help

Should return BusyBox v1.12.1 at the command line and in crontab.

Modifying the PATH variable will work too.

Last edited by mig (2009-01-08 16:56:13)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#3 2009-01-09 19:25:06

glenndm
New member
Registered: 2009-01-08
Posts: 2

Re: problem: crontab using different environment to login

thanks for the reply
adding the path did take care of the errors.
If I find the time, I'll try to understand why there is a difference between shell and crontab sessions.

best regards
glenn

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB