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 2010-01-25 16:08:44

Stefanix
Member
From: Bangkok
Registered: 2010-01-12
Posts: 9

Snapshot script does not update "current" link

Hi,

using the snapshot.sh script, the "current" link does not get updated to the last safe copy (needed for next hardlink references).

http://dns323.kood.org/howto:backup

The strange thing is, it works when I start the script manually, but it does not, when it is run by cron.
Here is the critical part:

Code:

var=`ls -1A $dstpath/$date | wc -l`

if [ $var -ne 0 ]
then
  rm $dstpath/current
  ln -s $date $dstpath/current
fi

I inserted already a "echo $var >>test.log" and another echo after "then" and found out that "var" is not set at all and the "then" part not entered, if the script is run by cron.  "var" is not even 0, not set.

What could this be? Am I the only one having this problem??
(FW 1.08 FFP 0.5)

Offline

 

#2 2010-01-28 11:19:53

Loose Gravel
Member
Registered: 2008-10-14
Posts: 50

Re: Snapshot script does not update "current" link

Read the Troubleshooting section at the end of the wiki-page you have linked:

If no current link is created, or current is pointing to the wrong (=old) directory after running the script via cron, add
export PATH=/ffp/sbin:/ffp/bin:$PATH
as the second line in your script. This will set up the ffp 0.5 environment needed for cronjobs on some machines. If you are using an older version of ffp, alter the path accordingly!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB