bug 219448

G. Milde g.milde@web.de
Tue, 10 May 2005 13:51:40 +0200


On  3.05.05, John E. Davis wrote:
 
>   The Default_Jedrc_Startup_File variable and the whole business of
> loading /etc/jed-init.d/... was added quite a few years ago at the
> request of the then debian maintainer.  I thought that it was a good
> idea, and still do; 

So do I. A system-wide configuration file is a good thing to have (and
better placed in /etc/ than in JED_ROOT/lib).

However, as I see it, there are up to 4 parties that might want to
configure/setup jed:

  * jed standard distribution  --> JED_ROOT/site.sl  
                                   (and currently JED_ROOT/jed.rc as
                                   fallback)
                                   
  * jed package maintainer     --> /etc/jed.conf
    (e.g. for jed on Debian)       (currently calling /etc/jed-init.d/...)
                                   or /usr/etc/jed.conf
    
  * Site administrator         --> /usr/local/etc/jed.conf

  * User                       --> ~/.jedrc (or, with home-lib.sl, 
                                            ~/.jed/jed.rc or ~/.jed/.jedrc)


To allow all these to contribute to jed customization, I suggest a change
in site.sl:


  if (strlen(expand_jedlib_file("defaults.sl")))
    () = evalfile("defaults");
  #ifdef UNIX
- else foreach (["/etc/jed.conf", "/usr/local/etc/jed.conf", "/usr/etc/jed.conf"])
+ foreach (["/etc/jed.conf", "/usr/etc/jed.conf", "/usr/local/etc/jed.conf"])
  {
     $1 = ();
     if (1 == file_status ($1))
       {
  	() = evalfile ($1);
-  	break;
       }
  }
  #endif


Should we keep the test for defaults.sl under UNIX or could it be skipped?

On Windows the situation differs and JED_ROOT/lib/defaults.sl
might be a sensible place for configuration there. (better ideas?)


 
>   If the idea behind /etc/jed-init.d/*.sl is to provide defaults, then
> /etc/jed.conf should set Default_Jedrc_Startup_File to NULL to prevent
> jed.rc from loading--- that is why this variable was added.

So we will do this for now.
 
>   At the moment, there is very little in jed.rc that actually gets
> executed.   It mainly consists of a number of variable settings.  Most
> of these correspond to defaults a may be commented out.  I will look
> at it again for the next release.

This would be nice. IMHO, all remaining non-default settings could be
transferred to site.sl and jed.rc simply kept as a template and example
(which would make Default_Jedrc_Startup_File obsolete).

Thanks

Guenter

-- 
G.Milde web.de