On Tue, 28 May 2013 05:55:39 +0200 Luca Barbato wrote: > On 5/26/13 4:58 PM, Ian Stakenvicius wrote: > > The way it's being proposed (and please correct me if i'm wrong), the > > wrapper is a direct replacement binary (small C program) for all init > > systems, and would based on some configuration file or whatnot > > determine and exec the init system it's supposed to -- and make any > > other necessary changes too, such as switching /etc/inittab) > > The really minimal wrapper would be something like > > #!/bin/sh > > INIT=/bin/init > > if [[ -e /etc/switch-init ]]; then > . /etc/switch-init > fi > > exec ${INIT} > > With switch-init doing stuff needed, including remounting the rootfs rw > if there are stuff to be changed and if we want stick to symlinks it > could replace itself by a symlink. > > Yes, it would be that simple. And you actually make the boot depend on: 1) valid /bin/sh, 2) valid /etc/switch-init which would not interfere with boot process. With switch-init being executed as a shell script, it can do anything. And I wouldn't be surprised if you made it do various things you'd like to be done. Not to mention what would happen if it gets corrupted into binary mess and shell tries to execute that. There's no fallback that could handle shell failures, you know. -- Best regards, Michał Górny