[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] recent FHS change of file locations


Hello Scott,

Could you apply the attached patch to the Branch-2.4 code and tell me if it 
resolves the FHS problem that you reported below.

Apply it with:

  patch -p0 <2.4.0-bacula.patch

  ./configure (your options)
  make
  ...
  make install

Feedback would be appreciated.

Best regards,

Kern

On Monday 16 June 2008 12:19:24 Scott Barninger wrote:
> On Mon, 2008-06-16 at 10:36 +0200, Kern Sibbald wrote:
> > Hello Scott,
> >
> > On Sunday 15 June 2008 18:25:47 Scott Barninger wrote:
> > > Hello Kern,
> > >
> > > Remember we recently changed scriptdir from /etc/bacula
> > > to /usr/lib/bacula for FHS compatiblility in the rpm packages? Just
> > > found a bug in the general bacula start/stop/status scripts after
> > > installing 2.4 rpms. The affected scripts I think are bacula and
> > > bacula-ctl-* and BACFDCFG. BACSDCFG and BACDIRCFG as prefixes to the
> > > scripts need to be replaced with scriptdir variable.
> > >
> > > <snip>
> > >
> > > # All these are not *really* needed but it makes it
> > > #  easier to "steal" this code for the development
> > > #  environment where they are different.
> > > #
> > > BACFDCFG=/etc/bacula
> > > BACSDCFG=/etc/bacula
> > > BACDIRCFG=/etc/bacula
> >
> > These are currently set to the sysconfdir variable, which may be
> > incorrect.
>
> Yes, they need to be set to scriptdir instead.
>
> > So that I can understand this better -- did you previously have the
> > scriptdir and the sysconfdir set to the same value?  Otherwise, I cannot
> > see how they ever could have worked.
>
> Yes, previously scriptdir and sysconfdir were both set to /etc/bacula.
> The change was to make scriptdir /usr/lib/bacula to comply with FHS.
>
> > Regards,
> >
> > Kern
> >
> > > case "$1" in
> > >    start)
> > >       [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1
> > > $2
> > >       [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1
> > > $2
> > >       [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir
> > > $1 $2
> > >       ;;
> > >
> > >    stop)
> > >       # Stop the FD first so that SD will fail jobs and update catalog
> > >       [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1
> > > $2
> > >       [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1
> > > $2
> > >       [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir
> > > $1 $2
> > >       echo
> > >       sleep 6
> > >       ;;
> > >
> > > </snip>
> > >
> > >
> > > -----------------------------------------------------------------------
> > >-- Check out the new SourceForge.net Marketplace.
> > > It's the best place to buy or sell services for
> > > just about anything Open Source.
> > > http://sourceforge.net/services/buy/index.php
> > > _______________________________________________
> > > Bacula-devel mailing list
> > > Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> > > https://lists.sourceforge.net/lists/listinfo/bacula-devel
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Bacula-devel mailing list
> Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/bacula-devel


Index: scripts/bacula.in
===================================================================
--- scripts/bacula.in	(revision 7106)
+++ scripts/bacula.in	(working copy)
@@ -13,22 +13,20 @@
 #  easier to "steal" this code for the development 
 #  environment where they are different.
 #  
-BACFDCFG=@sysconfdir@
-BACSDCFG=@sysconfdir@
-BACDIRCFG=@sysconfdir@
+SCRIPTDIR=@scriptdir@
 
 case "$1" in
    start)
-      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
-      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
-      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+      [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
+      [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
+      [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
       ;;
 
    stop)
       # Stop the FD first so that SD will fail jobs and update catalog
-      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
-      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
-      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+      [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
+      [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
+      [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
       echo
       sleep 6
       ;;
@@ -39,9 +37,9 @@
       ;;
 
    status)
-      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd status
-      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd status
-      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir status
+      [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status
+      [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status
+      [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status
       ;;
 
    *)
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.