Native upstart scripts

Patryk Zawadzki patrys at pld-linux.org
Tue May 4 12:04:39 CEST 2010


On Tue, May 4, 2010 at 11:17 AM, Jacek Konieczny <jajcus at jajcus.net> wrote:
> Hello,
>
> In PLD Th, we have upstart as the /sbin/init daemon for some time, but
> it is only used to start the old 'SysVinit' scripts from
> /etc/rc.d/init.d. To make full use of Upstart features, like process
> supervising, parallel start, etc. we should find a way to include
> Upstart support in our packages. Though, we should not replace the
> current, working solution.

+1

> I think Upstart support should be implemented as an option, coexisting
> with current solution, so the administrator may choose what he prefers
> and even use init.d for some services and upstart for other.

I was hoping for eventually dropping rc scripts for some services and
moving them completely to upstart. I see why that might sound scary
and am ok with having two solutions.

> My proposition:
>
> - packages will provide upstart configuration files in /etc/rc.d/upstart
> - those could be linked or copied to /etc/init/subsys when needed
>  - chkconfig would link/unlink the files when requested (global
>    configuration option and command line option to prefer upstart)
>  - user could copy them manually and modify them if needed
> - rc-scripts won't start/stop services via /etc/rc.d/init.d scripts when
>  /etc/init/subsys/$name exists
> - 'service' script would use 'initctl' instead of /etc/rc.d/init.d
>  when /etc/init/subsys/$name exists
> - scripts in /etc/rc.d/init.d would emit 'started' and 'stopped'
>  events when necessary, so upstart services can rely on that

I'd opt for having 2 separate -init subpackages, one with the current
rc.d contents and one with an upstart job description and a simple
rc.d wrapper that runs "start $foo", "stop $foo" etc.

As for emitting signals, we should add these as required by
dependencies. I see no gain from adding them to every rc.d script.

> What do you think? Should I try to prepare a proof-of-concept
> implementation?

Ladies and gentlemen, we have a volunteer :)

-- 
Patryk Zawadzki


More information about the pld-devel-en mailing list