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

Re: default init on non-Linux platforms



On 02/21/2014 03:37 AM, Ondřej Surý wrote:
> mkdir -p /run/openrc
> touch /run/openrc/softlevel
> 
> and then it still doesn't work as expected:
> 
> root@howl:/etc/init.d# /etc/init.d/rsyslog start
>  * WARNING: rsyslog is already starting
> 
> root@howl:/etc/init.d# /etc/init.d/rsyslog stop
>  * ERROR: rsyslog stopped by something else
> 
> root@howl:/etc/init.d# /etc/init.d/rsyslog status
>  * status: stopped
> 
> root@howl:/etc/init.d# ps uax | grep rsyslo[g]
> root      6743  0.0  0.0  52592  1752 ?        Ssl  20:28   0:00
> /usr/sbin/rsyslogd -n -c5
> root      6764  0.0  0.0   7768   856 pts/0    S+   20:28   0:00 grep
> rsyslog
> 
> Thomas, would it be possible to make openrc-run work even when the
> openrc doesn't replace /etc/init.d/rc{,S}? Or does it need too much from
> openrc infrastructure, so my idea is just too crazy?

I'm not sure about how much work it would be, or how easy it would be to
implement, but the more I think about it, the more I think it'd be great
to do this.

The only problem I'd see, is that we'd have to keep the LSB headers,
since startpar / insserv would still only understand that. Though that's
probably the least annoying part. If at least we can rewrite the rest of
the scripts using the runscripts simplification, and have this available
by default in Jessie, then it'd be awesome. Switching between OpenRC and
sysv-rc can be dealt with later then (since what's important is to have
runscript support as early as possible).

I'll see with the rest of the contributors what they think about it, but
Benda seem to be positive about the fact it's doable. I'd also like to
patch sysv-rc so that it could write in /run/openrc/started, so that we
get a list of running daemon when switching to OpenRC (and avoid the
hack of parsing with "for file in /etc/rc0.d" to do a manual shutdown
after the switch).

Cheers,

Thomas


Reply to: