On Fri, Aug 19, 2005, Matthias Kurz wrote:

> On Thu, Aug 18, 2005, Jesse Keating wrote:
> 
> [...]
> >                                          However one thing that _has_
> > bothered me is that when running bconsole, it does not by default look
> > at /etc/bacula/ for a bconsole.conf file.  So when I run it I have to
> > manually point to the config file with -c.  Current directory is viewed
> > for a conf file, it just makes sense to me that the /etc/bacula/
> > directory would be checked too.  So perhaps this change could be
> > piggybacked on as well?
> 
> Yes, *please*.

Well, it's probably easy to write a wrapper around all of the binaries,
like the (modified) bconsole wrapper below. But that's ugly. I'm not
so sure whether changing the lookup from "." to $prefix/etc/bacula is
convenient in all situations. E.g. on a rescue CD. Maybe a combination
of $HOME/.bacula with a bacula.conf file in it that has a "configdir"
directive. I wish i had kept my mouth shut.


   (mk)

8<------------8<------------8<------------8<------------8<------------8<

#!/bin/sh

prefix=/opkg # from the --prefix option

if [ $# = 1 ]; then
   case "$1" in
       -* ) ;;
        * ) set -- -c $1.conf ;;
   esac
fi
#   The following works, because bconsole accepts multiple '-c' options.
#   The last '-c' wins.
exec $prefix/sbin/bconsole -c $prefix/etc/bacula/bconsole.conf "$@"

8<------------8<------------8<------------8<------------8<------------8<

-- 
Matthias Kurz; Fuldastr. 3; D-28199 Bremen; VOICE +49 421 53 600 47
  >> Im prämotorischen Cortex kann jeder ein Held sein. (bdw) <<


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to