[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Init : someone could comment this ?

Nils Philippsen <nphilipp 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

 |-- 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


>> 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

> built-in regular expressions or

where do you need regexps in initscripts?

> exceptions

set -e


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]