Maybe, you need to use a script which explicitly returns a status 0 ?

If it can help, this is the scripts I use :

RunBefore :

#!/bin/bash

if test $# -lt 2 ; then
 echo "usage: ouvreTunnel.ssh <host> <port>"
 exit 1
fi

if [ -d /tmp/Tunnels/${1}/${2} ]
then
 echo "Erreur : tunnel fantome $1 $2" >> /var/log/tunnels
#  /usr/local/baculaScripts/Tunnel/fermeTunnel.ssh $1 $2 2> /dev/null
else
 mkdir -p /tmp/Tunnels/${1}/${2}
/usr/bin/ssh -fnCNg -L 9112:localhost:9112 -R 9101:hunt.u-strasbg.fr:9101 -R 9103:hunt.u-strasbg.fr:9103 [EMAIL PROTECTED] -p $2 > /dev/null 2> /tmp/Tunnels/${1}/${2}/erreurs Process=`ps -ef | grep "/usr/bin/ssh -fnCNg -L 9112:localhost:9112 -R 9101:hunt.u-strasbg.fr:9101 -R 9103:hunt.u-strasbg.fr:9103 [EMAIL PROTECTED] -p $2$" | awk '{print $2}'`
 touch /tmp/Tunnels/${1}/${2}/${Process}
 ERREURS=`cat /tmp/Tunnels/${1}/${2}/erreurs | wc -c`
 if [ $ERREURS -ne 0 ]
 then
   kill $Process
   rm -rf /tmp/Tunnels/${1}/${2}/
 fi
 exit $ERREURS
fi

RunAfter :

#!/bin/bash

if test $# -lt 2 ; then
 echo "usage: fermeTunnel.ssh <host> <port>"
 exit 1
fi

Process=`ls /tmp/Tunnels/${1}/${2}/ | grep -v erreurs`
rm -rf /tmp/Tunnels/${1}/${2}/
kill $Process 2> /dev/null
exit 0


Jonas Björklund a écrit :

Hello,

On Sat, 9 Jul 2005, Igor Kanjuka wrote:

> guess the -n option will help you.

Nope, the problem exist. =(
ssh forks into background. And it seems that Bacula is waiting for the fork to exit.


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to