I am running a post job python script that fails because python is unable to import some libraries. I am running bacula as root. When running the script manually as root there are no problems. Issuing the env command as root yields a correct PYTHONPATH variable:
PYTHONPATH=/usr/lib64/portage/pym:/prod/bacula/local/lib64/python2.4/site-pa ckages:/prod/bacula/local/lib/python2.4/site-packages I wrote a small test script to determine what the environment variables look like when the director fires off a script as follows: #!/bin/bash echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" >> /prod/bacula/var/bacula-environment echo "" >> /prod/bacula/var/bacula-environment date >> /prod/bacula/var/bacula-environment echo "" >> /prod/bacula/var/bacula-environment /bin/env >> /prod/bacula/var/bacula-environment whoami >> /prod/bacula/var/bacula-environment echo "***********************************************************" >> /prod/bacula/var/bacula-environment This yields the following output: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Thu Sep 6 18:30:54 CDT 2007 SHELL=/bin/bash TERM=xterm DEFAULTLEVEL=default USER=root PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/loca l/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bi n/4.1.2 PWD=/ BOOTLEVEL=boot CONSOLETYPE=pty SVCNAME=bacula HOME=/root SHLVL=2 SOFTLEVEL=default _=/bin/env root *********************************************************** Can anyone help me to understand why the the PYTHONPATH environment variable is missing when the director fires off my simple shell script? I'm not sure if I am doing something incorrectly within Bacula or if I've somehow configured my Linux distro incorrectly. Thanks in advance for any advice with this problem. If you need more information please let me know. Brian Kelly
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users