[lxc-devel] Improved sysvinit script
Dwight Engen
dwight.engen at oracle.com
Thu Feb 27 18:27:11 UTC 2014
On Thu, 27 Feb 2014 18:36:03 +0100
Gianluigi Tiesi <sherpya at netfarm.it> wrote:
> On 02/27/14 15:22, Dwight Engen wrote:
> > These changes will break the script on Fedora and derived distros.
> > The reason for /var/lock/subsys is that without it [1], SysV init
> > (on Fedora at least) won't call the K script at shutdown time so
> > the containers don't get a chance to shut down cleanly.
>
> this is not really an issue, vmware does
> [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
> before doing touch
> it's harmless on debian but I don't think it usefull for debian
>
> >
> > There are other problems as well, /lib/lsb/init-functions might not
> > exist, and even when it does on Fedora it does not contain
> > log_progress_msg() nor log_daemon_msg().
> >
> > Maybe it is not practical to have a cross distro sysvinit script?
> > Perhaps we should have distro specific scripts ala the way we do
> > default.conf in lxc/config/etc?
>
> Most of the script can be shared, there is already a configure time
> switch (with-distro), you can make lxc.in and replace the distro
> specific parts:
Sure that may be possible, but we may end up replacing enough parts
that it would be better to just have separate files and not so many
AC_SUBST. I'm all for it if we can get it to work cross distro, but it
may be a bit tricky.
For example, most of the log_* things you're using aren't actually
required by my reading of lsb [1], and don't exist on the Fedora
derived distros. I'm not sure we want to require users on the Fedora
derived distros to install the lsb package in the first place (its not
by default afaik).
> I'll check fedora init docs and make a patch, but doesn't fedora uses
> systemd now?
Yes, I was referring to older Fedora derived distros ie. RHEL, Oracle,
CentOS etc. I actually use the sysvinit script still even on my systemd
systems because the systemd unit lxc ships doesn't actually work
right now, but that is a different discussion :)
> I don't think lxc is suitable for old distributions, I had to use
> kernels from backports to have a good support in debian stable (3.11
> vs 3.2.0)
> and I still waiting for 3.13 because 3.12 breaks lxc-attach
>
> Regards
>
[1] http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
More information about the lxc-devel
mailing list