[Lxc-users] Startup scripts [Was: Re: security question]
Matto Fransen
matto at matto.nl
Sun Aug 21 21:25:21 UTC 2011
Hi,
On Sun, Aug 21, 2011 at 06:01:02PM +0100, Gordon Henderson wrote:
> FWIW:
>
> I've been using the file-rc boot script mechanisms rather than the sysv-rc
> system for LXC containers. That might seem like a step backwards, but
> actually, it's fine and gives you much finer (& easier IMO) control over
> what gets started and stopped when a container is booted. You still get
> the usual /etc/init.d with scripts in it, but rather than a lot of
> /etc/rc.X directorys, just one file; /etc/runlevel.conf with hooks into
> the scripts and what runlevels to execute them in.
I have a custom /etc/init.d/rcS in my LXC containers. That file contain some
lines like
/etc/init.d/ssh start
/etc/init.d/mysql start
/etc/init.d/apache2 start
This provides a lot of control and prevent a lot of trouble IMHO :)
Cheers,
Matto
More information about the lxc-users
mailing list