Init : someone could comment this ?
Enrico Scholz
enrico.scholz at informatik.tu-chemnitz.de
Mon Jan 7 18:27:53 UTC 2008
Nils Philippsen <nphilipp at redhat.com> writes:
>> > There's no guarantee that the pid of the child process that the init
>> > system forked will be the pid of the long running process
>>
>> then, the program is broken...
>
> I don't think that there's a standard -- de-facto or written down --
> that mandates this.
sorry, but a design like
parent
|-- child0
`- child1
where signals must be sent to child0 to control parent + child1 smells
somehow broken.
>> > To make the init process robust, services should check their
>> > prerequisites before starting, or even ensure that they are met
>> > (e.g. /etc/init.d/sshd generating host keys).
>>
>> Question is where to draw the line. E.g. do you make 'rpm -V postgresql'
>> to verify that program is not corrupted?
>
> You know what I mean
no
>> Resulting scripts will be much longer. E.g. how much lines of python
>> code are required for
>>
>> | sed '/^foo/s!/bin!/opt!' file | tac
>
> Where would you find such a line in an init script?
Does it look so uncommon? 'sed' is used very often, pipes too. 'tac'
can be there too, e.g. with a trailing 'sed "1p;d"'
>> What are you missing specifically?
>
> Powerful string ops come to mind,
which string ops other than ${..##..} + ${..%%..} do you need in
initscripts?
> built-in regular expressions or
where do you need regexps in initscripts?
> exceptions
set -e
Enrico
More information about the fedora-devel-list
mailing list