El Sat, 27 Oct 2007 01:42:40 +0200
Eric MSP Veith <[EMAIL PROTECTED]> escribió:

> Heh, I just forgot the IMHO most important idea that came up. :-)
> 
> What about different ifile branches, a generic one and one for each
> distro we are able to support. The generic branch would use boot-time 
> configuration in /etc/initng/bootconf.d, configuration settings could
> be retrieved with a fast C program that is called from scripts. These
> generic calls would be distinctive and not very special, beeing
> easlily replaceable.

I think it's a good idea to have different branches. But I think this
isn't the time for the change, I prefer to make the transition after
the first release of initng-0.7.x if possible.

> 
> I'm currently working on that C program (I call it "bootopt"),
> because I'm going to use it with my own ifiles branch. I'm going to
> stick with the Bernstein Way, which basically means that every option
> is a file. If a file existis, the option is set. If the option takes
> an argument, we read _one line_ from the file. Nobody can make any
> mistakes that way, syntax errors are gone forever.
> 
> Bootopt takes the follwing switches:
> 
> - -b    (boolean) Exit with 0 if the option is set (the file exists)
>       or 1 if not. Does not output anything.
> - -g    (get) Prints out the option set (or nothing if the file is
>       empty), returns 0 if the option is set, 1 otherwise. This is the
>       standard behaviour.
> - -s    (set) Sets the option to a specified value or to \"true\" if
>       used in conjunction with -b.
> 
> In the distro-specific ifiles, the bootopt call could either be
> directly replaced with the corresponding call (mostly including some
> shell script) that is used on this distro, or bootopt could evolve to
> a transparent layer for alot of configuration schemes.
> 
> Again, tell me what you think. :-)
> 

Well, the problem here is that it's very expensive to stat/read a lot of
small files in contrast to read only one file once, and it doesn't
helps with compatibility...

A better solution IMO, is to have a static script to config-file
mapping, so that we don't have to think about it, and actually avoid
supporting the distro configuration, also we can make a menu-based
configuration utility, maybe using dialog...

Attachment: signature.asc
Description: PGP signature

-- 
_______________________________________________
Initng mailing list
[email protected]
http://jw.dyndns.org/mailman/listinfo/initng

Reply via email to