I've just tested it with the Bacula 15 Beta on FreeBSD 12.4 and found that the
value of HOME in the ClientRunBeforeJob script comes from when bacula-fd was
started and Bacula doesn't change it.

How are you starting Bacula 9.6.7?  Note that FreeBSD's system startup scripts
such as /etc/rc and /usr/sbin/service explicitly set HOME=/ so that might be
the cause of the difference and will also happen if Bacula 13.x is started
that way.

FWIW, the make_catalog_backup.pl sets HOME=$wd while running pg_dump.  Maybe
you need to do something similar?

__Martin


>>>>> On Thu, 23 Nov 2023 09:02:36 -0500, Dan Langille said:
> 
> Hello,
> 
> One of the features of a is a script. I frequently use ClientRunBeforeJob to 
> invoke pg_dump - I'm sure others may do similar.
> 
> For Bacula 9.6.7, when in that script, the value for $HOME is /
> 
> The UID is 0, i.e. root.  On FreeBSD, root's home directory is /root.
> 
> I'm not sure why that differs.  I've been told that Bacula 13.x does the 
> right thing and HOME is /root - I was looking through the commits trying to 
> find something which fixed this. I failed. I also checked the release notes 
> and GitLab issues; no mention.
> 
> Does anyone recall this change?
> 
> To aid in tracking down this issue, could you add "echo $HOME" to your 
> script. Is it / ?  Regardless, what version are you running and what HOME 
> directory is reported?
> 
> NOTE:
> 
> - I'm not asking for bug fix
> - I'm looking for a commit which made a deliberate change to the behavior
> - Knowing the history as to why it changed might be useful
> 
> Thank you.
> 
> -- 
>   Dan Langille
>   d...@langille.org
> 
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to