On Thu, 27 Oct 2005, Josh Fisher wrote:
I have a problem with the following ClientRunBeforeJob script
running on a Fedora Core 3 client machine using bacula-fd version
1.36.3.
#!/bin/sh
ldapbak=/etc/bacula/ldap_backup.ldif
rm -f $ldapbak
/etc/init.d/ldap stop &>/dev/null
slapcat -l $ldapbak
ret=$?
/etc/init.d/ldap start
if [ "$ret" != "0" ]; then
exit 1
fi
exit 0
On the client machine, bacula-fd runs as user root and group bacula.
The slapcat command fails when the job is started from bconsole,
returns "slap_startup failed" message, and cancels the job due to
the script returning non-zero. However, I can manually run the
script from a shell on the client machine without issue. Any idea
what I'm doing wrong?
Instead of invoking the init script directly, try using the
/sbin/service wrapper script. It'll setup your environment correctly,
which might not be happening in the bacula app space.
Instead of
/etc/init.d/ldap {start,stop}
do
/sbin/service ldap {start,stop}
--
Paul Heinlein <> [EMAIL PROTECTED] <> www.madboa.com
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users