systemd has ConditionVirtualization=chroot nspawn whatever
openrc has depends() { keyword -prefix -docker -whatever }
What about 66
? Yes, it has CONTAINER=1
TREE=
and you can reconfigure the boot@system
to skip whatever isn't needed in containers.
But what about when your system is hosed, and you need to chroot
to it?
A chroot
is no longer sufficient, a full "container" with a pidns and whatever else, is needed.
I have an execline script which uses 66-ns
in order to achieve this, but the TTY services, hwclock, term-encoding etc...
In systemd
especially everything works transparently, systemd-nspawn --boot /mnt/chroot.d/
will start systemd perfectly well, without the extra unexpected services, everything perfectly well. TTY, the graphical tree target, and many others which tinker with the hardware, etc... are disabled, and the ${SHELL}
of root is started.
Stopping is just as seamless, with an ordinary call to systemd to poweroff.
However, systemd has many more problems, here I am using 66
.
Will there be support in 66-execute
for [Condition]
which will have all the condition-checking keys, and maybe even an Execute=()
whose exitcode will determine whether condition is preferable or not...
I am encountering this problem as I have to increasingly tinker with my gentoo system to accomodate both openrc and 66, as I am packaging and preparing the latter for gentoo... with all the necessary tools and scripts to compete with systemd (of course, just related to the init; Including s6-sudo
, s6-socklog
etc... BTW)