[Bese-devel] Load a custom ucwctl.conf (was Re: Loading UCW with ucwctl, cl-launch etc)

Luca Capello luca at pca.it
Fri Apr 14 22:29:22 UTC 2006


Hello!

On Thu, 13 Apr 2006 11:46:28 +0200, Luca Capello wrote:
> On Thu, 13 Apr 2006 03:34:41 +0200, Nathan Bird wrote:
>> Is there any way to use a ucwctl.conf that isn't at /etc/ucw? I am
>> going to have to specify at least configfile and var every time.
>
> Ok, I think I need to implement another option for ucwctl, which
> will be -u or --ucwctl-config and will default to
> /etc/ucw/ucwctl.conf if empty.  Moreover, this won't be a mandatory
> option, as all ucwctl.conf values can be overridden by the other
> command line options.

Actually, it's quite complex to have a custom ucwctl.conf.

Here's the actual situation:

- /etc/ucw/ucwctl.conf (if it exists) is readed as soon as you call
  ucwctl

- any command line options present is set

Different solutions (the order is my preference)...

1) the simplest one is to allow a per-user ~/.ucw/, which will be
   similar to /etc/ucw/ in content, but will supersede /etc/ucw/.
   This let a normal user to start ucwctl without root privileges and
   without specifying too many command line options.  IMHO this is
   useful in any case.

2) allow the -u|--ucwctl-config command line option, but superseding
   every other command line option.  This because we don't have any
   simple method to parse a specific command line option before the
   others (and we can't assume that -u will be the first command line
   option).  Solution 1 will alwasy be a fallback.

3) allow -u and all the other command line options.  This will be
   really a pain to be coded: you must set the command line options as
   temp (something like CONFIGFILE_TMP), at the end of the parse run
   you read the ucwctl.conf (if present, fallback is solution 1) and
   finally "fix" the temp variables.  Feasible, but not my
   preferred...

Comments?

Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060415/6f37403c/attachment.sig>


More information about the bese-devel mailing list