tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: inetd enhancements - config syntax



    Date:        Fri, 15 Jan 2021 17:43:45 -0800
    From:        John Nemeth <jnemeth%cue.bc.ca@localhost>
    Message-ID:  <202101160143.10G1hjBv018774%server.cornerstoneservice.ca@localhost>

  | The way to implement including
  | directories is to stat the item being included to see if it is a
  | directory, and if it is, then branch to a routine that will scan
  | the directory and call the file inclusion routine on each file

When doing this, you also need to decide whether the order of the
config commands matters - if it is all just service definitions,
then it doesn't (shouldn't) and so the files in the directory can
be processed in any order (eg: the order they happen to appear in
the directory).  But if there are any kinds of global commands (like
the ability to set the listen address for future service definitions)
then order matters, and there might need to be a way to order the
directory contents to achieve the desired effect ... it all depends
upon the specifics of the definition of the config language.

But do think about this - it isn't too hard to add an ordering
mechanism in the original design (and then if it turns out to be
superfluous, just ignore it), but it is hard to retro-fit, as
by that stage you need to deal with existing configurations.

If some kind of ordering is wanted, then the method used by /etc/rc
(or something like it) is orders of magnitude better, and easier
to manage, then the horrible numbered file technique that the
Sys V init used for its init.d (and has been used in various other
places) which is manageable only when the number of files to be
ordered is very small, and changes rarely.

kre



Home | Main Index | Thread Index | Old Index