[Pkg-sysvinit-devel] Bug#673207: /etc/default/rcS is perhaps a better place for FANCYTTY variable

Roger Leigh rleigh at codelibre.net
Mon May 21 10:18:23 UTC 2012


On Mon, May 21, 2012 at 11:08:09AM +0200, Didier 'OdyX' Raboud wrote:
> Hi Roger, and thanks for your (quick) feedback,
> 
> Le 18.05.2012 22:16, Roger Leigh a écrit :
> > On Fri, May 18, 2012 at 10:00:12PM +0200, Didier Raboud wrote:
> >> Le jeudi, 17 mai 2012 00.19:38, Stanislav Maslovski wrote :
> >>> Evidently, if you decide to use /etc/default/rcS for this setting,
> >>> this file should *not* be simply sourced from /lib/lsb/init-functions.
> >>> Instead, you may use something like
> >>>
> >>> FANCYTTY=$([ -e /etc/default/rcS ] && . /etc/default/rcS && echo $FANCYTTY)

I'm not sure why you need to do this BTW, none of the existing users
do.  If you want to avoid polluting your environment with settings
you don't need, then it's fine, but otherwise I don't see the need.

> >> After an initial perplexity, I think I now quite like this idea. From the rcS 
> >> manpage: "rcS - variables that affect the behavior of boot scripts", so it 
> >> would be a good fit for /etc/default/rcS.
> >>
> >> Given that /etc/default/rcS is managed by initscripts (from src:sysvinit), I'm 
> >> hereby asking the sysvinit maintainers: what do you think?
> > 
> > One problem right now is that /etc/default/rcS is not a conffile, and
> > is never upgraded after the initial install.  Adding the option would
> > only make it available for new installs.
> 
> Just to make sure I understand that correctly: would it be possible to
> let lsb-base's /lib/lsb/init-functions read FANCYTTY from /e/d/rcS right
> now ?

You can do it right now, it's just that it's not guaranteed to be set.
So you'd need to set a default, then source the script.  E.g.:

FANCYTTY=defaultval
[ -e /etc/default/rcS ] && . /etc/default/rcS

> A plan to do this would imply:
> 
> a) changing lsb-base.README.Debian (and .NEWS) to point to /e/d/rcS
> instead of /e/lsb-base-logging.sh.
> 
> b) Add the above sourcing of /e/d/rcS to init-functions

This sounds fine.

> c) writing maintainer scripts to make sure an already defined FANCYTTY
> in /e/lsb-base-logging.sh gets written to /e/d/rcS (Policy doesn't
> really allow this).

Actually, you are probably OK, since it's not (yet) a conffile.
But it would be better to have it provided as part of the initscripts
defaults.  UTC got moved out yesterday (by util-linux).  We can now
(if there is agreement) make rcS a regular conffile--the primary
reason for it not being a conffile having been removed.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



More information about the Pkg-sysvinit-devel mailing list