<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 07/10/2011 05:35 PM, Matthew Garrett wrote:
    <blockquote cite="mid:20110710213558.GA27983@srcf.ucam.org"
      type="cite">
      <pre wrap="">On Sun, Jul 10, 2011 at 03:56:25PM -0500, Chris Adams wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Once upon a time, Matthew Garrett <a class="moz-txt-link-rfc2396E" href="mailto:mjg59@srcf.ucam.org">&lt;mjg59@srcf.ucam.org&gt;</a> said:
</pre>
        <blockquote type="cite">
          <pre wrap="">The suggestion isn't that having the options is wrong
</pre>
        </blockquote>
        <pre wrap="">
Well, that's what you said before (conveniently snipped from your
reply).  You compared CLI args/env vars to the BKL as something to be
eliminated; specifically, you said (and I quoted):

</pre>
        <blockquote type="cite">
          <pre wrap="">In this case there are sound
technical arguments against configuration by command line argument or
environment variable
</pre>
        </blockquote>
        <pre wrap="">
You have still failed to enumerate even one of the "sound technical
arguments".
</pre>
      </blockquote>
      <pre wrap="">
"Configuration by", not overriding configuration. It's a mistake to have 
</pre>
    </blockquote>
    Says you. It has seemed to work OK for the last 25+ years. I don't
    ever remember having a problem<br>
    in my 25+ years of working with UNIX/LINUX with the existing
    initscripts. Where are the BZ reports<br>
    that we are fixing with systemd?<br>
    <blockquote cite="mid:20110710213558.GA27983@srcf.ucam.org"
      type="cite">
      <pre wrap="">your daemon's configuration be handled by a shell script that's sourced 
into existing environment. It's reasonable for an admin to override 
configuration on an as-needed basis.

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">it's that having 
them as the primary means of configuration is poor design. If your 
entire configuration takes the form of a shell script that constructs a 
set of command line options then you've increased fragility for no 
benefit. Having a proper configuration file and allowing admins to 
override specific aspects of that from the command line isn't a problem.
</pre>
        </blockquote>
        <pre wrap="">
You are moving the target (to a worst-case example) and still not
winning your argument.
</pre>
      </blockquote>
      <pre wrap="">
The discussion was about having significant quantities of configuration 
in /etc/sysconf in the form of shell fragments.

</pre>
      <blockquote type="cite">
        <pre wrap="">This is more than theoretical to me; a small package I maintain is one
example of a command-line configured daemon.  The shmpps daemon is a
tiny little daemon that reads a timing pulse-per-second and updates a
shared memory segment.  It uses a few command line arguments to set the
source port/type and shared memory segment destination; right now, that
is done for the init script by a file in /etc/sysconfig.
</pre>
      </blockquote>
      <pre wrap="">
And that's a bad thing to do. You're sourcing your configuration in an 
unsanitised environment. There's a huge number of ways that this can go 
wrong depending on the admin's local configuration, which is clearly 
undesirable.

</pre>
      <blockquote type="cite">
        <pre wrap="">This is a small, light-weight daemon, and doesn't need a configuration
file parser.  This is a valid way that Unix daemons have run for
decades, and you are saying that should be removed.  I guess every small
daemon now needs to include its own config file parser, replacing the
already-existing getopt() call?  How is this "better"?
</pre>
      </blockquote>
      <pre wrap="">
Nobody's said it should be removed. Lennart's said that it sucks, and I 
agree. But all of this would still be better with a simple config parser 
that's shared between any daemons that want it.

</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Stephen&nbsp;Clark<br>
      <b>NetWolves</b><br>
      Sr.&nbsp;Software&nbsp;Engineer&nbsp;III<br>
      Phone:&nbsp;813-579-3200<br>
      Fax:&nbsp;813-882-0209<br>
      Email:&nbsp;<a class="moz-txt-link-abbreviated" href="mailto:steve.clark@netwolves.com">steve.clark@netwolves.com</a><br>
      <a class="moz-txt-link-freetext" href="http://www.netwolves.com">http://www.netwolves.com</a><br>
    </div>
  </body>
</html>