init: API
Avi Kivity
avi at argo.co.il
Sun Nov 20 20:17:57 UTC 2005
Kenneth Porter wrote:
>
> So far all init scripts are written in Bash, and the ones I'm familiar
> with use simple variable=value pairs, using Bash syntax. Is that
> sufficient? What can't be expressed in that way?
hierarchical configuration. multiple instances of the same service. most
complex services have their own config files so the complexity is pushed
there.
>
> The hierarchical configuration I've seen has been in the networking
> scripts, and is encoded in the filesystem, using filenames or
> directory trees to represent configuration nodes. What's the drawback
> of that, if any?
>
dependencies not expressed explicitly, messy config files.
for example, my ppp0 depends on eth0, and a potential vpn would depend
on ppp0. there is no way to express that with the current syntax. there
is special support for bonding, etc.
also it's horribly slow:
[root at blast ~]# time /sbin/service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
[ OK ]
real 0m11.043s
user 0m0.656s
sys 0m0.776s
1.4 seconds of cpu time to issue a few ioctls and send a couple of
packets (2.4GHz Athlon64).
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
More information about the devel
mailing list