helpstoreBackup - Support: sr #108523, Strange problem with $PATH

 
 

sr #108523: Strange problem with $PATH

Submitted by:  Alber <alberfilba>
Submitted on:  Sat 01 Mar 2014 09:31:25 PM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 02 Mar 2014 07:51:36 AM UTC, comment #1: 

Hi Alber,

I don't have a Raspberry PI, so I can only try to solve the problem with your help :-) .

Can you send your answer via email directly to me? Using this platform to track down the problem is mostly painful and I don't want to publish patches before I know they work. After (hopefully) solving the problem you (or I) can show the result(s). Also, I don't want to patch version 3.4.3 but the upcoming version 3.5 (less work for me).

After playing around a little bit (by setting some variables arbitrary), I think the reason for the "uninitialized value" (line 2665) is that on your system PATH doesn't work correctly in combination with storeBackup (for whatever reason).
A few lines above the "uninitialized value" you find:

    my $uname = forkProc->new('-exec' => 'uname',
      '-outRandom' => "$tmpdir/uname-",
      '-prLog' => $prLog);

Can you change this to

    my $uname = forkProc->new('-exec' => '/bin/uname',
      '-outRandom' => "$tmpdir/uname-",
      '-prLog' => $prLog);

(I think 'uname' is located in /bin in your system also!?)
Can you also show the output of the command 'uname' (without options)? It should be 'Linux'.

I don't think this will solve your problem, but we have to track it down step by step.

Regards, Heinz-Josef

Heinz-Josef Claes <hjclaes>
Project Administrator
Sat 01 Mar 2014 09:31:25 PM UTC, original submission:  

Hello storeBackup community!

I've been using storeBackup (sB) since v3.3 with no problems at all. I'm running it on a Raspberry Pi with the raspbmc distribution. The output of 'uname -a' is 'Linux raspbmc 3.6.11 #1 PREEMPT Sun Feb 3 04:42:21 UTC 2013 armv6l GNU/Linux'.

Since a year ago, every time sB is executed by cron, the backup fails because of the following error, as listed on the log file.

BEGIN     2014.03.01 21:40:56 15853 backing up directory </home/pi/SCRIPTS/StoreBackup/stbu_media_simlinks> to </media/BACKUP_EXT4/backups/media>
VERSION   2014.03.01 21:40:56 15853 storeBackup.pl, 3.4.3
INFO      2014.03.01 21:40:56 15853 setting ARG_MAX to 4096
ERROR     2014.03.01 21:40:56 15853 the following programs are not in $PATH:
ERROR     2014.03.01 21:40:56 15853     which
ERROR     2014.03.01 21:40:56 15853 please install or check $PATH
ERROR     2014.03.01 21:40:56 15853 $PATH is /opt/storeBackup/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/opt/vc/bin:/home/pi/.xbmc-current/xbmc-bin/bin
ERROR     2014.03.01 21:40:56 15853 caught signal 1, terminating

Also, If I execute (from the command line) the script that calls sB with the proper arguments to perform the backup, I get the following error:

Use of uninitialized value in exists at /opt/storeBackup/bin/storeBackup.pl line 2665.

The code line in storeBackup.pl (v3.4.3) line 2665 is:

if (exists $execParamLength{$$out[0]})

As you can see, it seems that sB cannot locate 'which' executable. However I can find it in /usr/bin, which happens to be in $PATH.
This has been a minor problem since I can perform successful backups with sB on the first time after a system reboot. However the following sB backup script executions fail with the mentioned problem. Isn't it weird?

I've upgraded sB to v3.4.3 but the problem persists. I've not tried to reinstall or upgrade raspbmc because it would be very difficult (aka PITA) to me to get it running as I've got it now.

Can you guess where the problem comes from? Is it sB or raspbmc? Any help or tip would be very welcome :D

Thanks for your attention!

Alber <alberfilba>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hjclaes (Posted a comment)
  • -email is unavailable- added by alberfilba (Submitted the item)
  • -email is unavailable- added by alberfilba
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-01 alberfilba Carbon-Copy- => Added alberfilba

    Back to the top


    Powered by Savane 3.7