On Sun, 26 May 2013 08:43:32 +0200
Michał Górny <mgo...@gentoo.org> wrote:

> On Sat, 25 May 2013 11:54:48 +0200
> Luca Barbato <lu_z...@gentoo.org> wrote:
> 
> > - /sbin/init (or whatever linux currently calls by default with top
> > priority) should be either a symlink to the actual implementation
> > or a wrapper such as our gcc one. I like better the latter since it
> > is overall safer. The former might or might work since linux has
> > some fallback capabilities but hadn't been tested.
> 
> Increased complexity is never safer. And a wrapper means the
> additional complexity gets there every boot. And considering how the
> discussion goes, the wrapper will grow openrc-size in a few months...
> 
> Symlinks are simple. They're filesystem feature, they're handled
> by kernel. The worst thing that could happen is symlink target
> disappearing -- but then it's:
> 
> a) our responsibility to make sure to call eselect-init (if applies)
> when uninstalling an init system,
> 
> b) something that would fail anyway if user did that by hand.
> 
> Linux fallback mechanism is *good enough*. You may think that fallback
> to sysvinit is good but it's not. *If* I have my system set up to boot
> X, at some point the config for Y will get seriously outdated.
> 
> I use systemd for a few months now, and last time I checked openrc
> boots somehow. But considering the general complexity of it, I
> wouldn't be much surprised if it failed in funny ways (like not being
> able to handle automounts properly), caused cruft on the filesystem
> or even caused *damage*.
> 
> And since you've been failing long at keeping init.d scripts simple
> and reasonable, the damage potential is not something purely
> theoretical.
> 
> That said, switching /sbin/init is the reasonable way. If it fails,
> Linux runs /bin/sh. EOT. You broke, you fix, any way you like. Without
> unexpectedly switching init system to something else just because it
> was around.

I agree with this. But changing symlinks is not as easy on running
system (since it can cause inconsistence during rebooot). I think that
safest way not using wrapper is to stop all services and keep only
mounted /, than change things (symlinks,configuration update) and
reboot. 

Thus this "eselect init" will let the user confirm and then trigger
reboot. I do not think that users will change init all the time, thus
make it better safe and more complex in this change is better than
check and wrap in all the boots.

Otherwise interesting is preinit handler in OpenWrt:
http://wiki.openwrt.org/doc/techref/process.boot
http://wiki.openwrt.org/doc/howto/notuci.config#etcpreinit
http://wiki.openwrt.org/doc/techref/preinit_mount

Robert.

> 
> > - init gets effectively switched only at boot/reboot, eselect init
> > must keep track of the current active init and make sure the
> > current init configuration is used till the system reboots, if we
> > use the wrapper approach, it would pick up what's the new init at
> > boot and that would be enough for simple cases, hooks on reboot are
> > still needed for more complex ones.
> 
> Pointless and overcomplex. If an init system actually fails to work
> when /sbin/init doesn't point to it, it is seriously broken by design.
> And because of that breakage, we keep stuff like 'telinit' or 'reboot'
> intact, and because of it systemd has 'pass-through' mode when linked
> to /sbin/init.
> 
> > - we could try to not have the changes to the current init systems
> > ebuild or reduce them to the bare minimum (e.g. not
> > overwrite /sbin/init)
> 
> Which means the kernel fallback will be dangerously active
> as I explained before. Just don't do it.
> 
> > # FOCUS
> > 
> > My interest is mostly if not all on bb-init-openrc and slightly on
> > runit-openrc.
> > 
> > There are enough people involved in systemd and since I still
> > consider it a dangerously frail implementation of a bad idea is
> > better if I do not touch it at all.
> 
> You've been able to keep this thread on topic very long. Good job!
> 


Reply via email to