On 17.03.2012 17:48, Thomas Goirand wrote:
> On 03/17/2012 08:40 PM, Philip Hands wrote:
>> I'm happy to help with that ...
> 
> Cool! Let's do it together then.
> 
>> although, I doubt we're the first people
>> to think of something like this, and it would be a shame to ignore an
>> existing solution.
>>
>> RedHat have some functions for use in init scripts, in
>> /etc/rc.d/functions (although I've not used RedHat for a decade or more,
>> so I've no idea what's included there).
>>   
> 
> I had a look in a CentOS VM, and I didn't see such file. Is it only in RHEL?
> 
>> OpenWRT does something quite interesting, which is that they have an
>> /etc/rc.common and then make the init scripts start thus:
>>
>> #!/bin/sh /etc/rc.common
>> # Copyright (C) 2006-2010 OpenWrt.org
>> # Copyright (C) 2006 Carlos Sobrinho
>>
>> NAME=dropbear
>> PROG=/usr/sbin/dropbear
>> START=50
>> STOP=50
>> PIDCOUNT=0
>> ...
>>
>> so the thing that actually gets run is the /etc/rc.common, which sources
>> the init.d script at its end, so it is possible to override any part of
>> the common script by including functions in the service specific script,
>> but otherwise it just does the default.
>>   
> 
> The idea is nice, I think that being able to overwrite the functions
> you want is cool, even though there are many other ways to do it.
> But it seems to be a bit hard to integrate with dh_installinit, Probably,
> what we would like is a symlink to this rc.common, with the
> package specific script being located in /etc/$whatver being sourced
> by rc.common, right? Do you see how we could do and keep a
> dh_installinit compatibility?
> 


looks like you are wanting to re-invent openrc [1]

[1] http://roy.marples.name/projects/openrc
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to