[buildd-tools-devel] Bug#625205: Bug#625205: is there a way to automatically start services inside an schroot session?
Roger Leigh
rleigh at codelibre.net
Sun May 13 00:05:45 UTC 2012
On Sun, May 13, 2012 at 01:05:00AM +0200, Marc Haber wrote:
> On Mon, May 02, 2011 at 06:09:22PM +0100, Roger Leigh wrote:
> > If limited to services, we could
> > create a directory e.g. /etc/schroot/autorun and have files in
> > there defining which services to run in which chroot, e.g.
> >
> > [unstable]
> > postfix
> > postgresql-9.0
> >
> > [unstable]
> > postgresql-8.3
> >
> > [stable]
> > apache
> >
> > as a simple example. Any thought on what information is needed
> > would be very useful.
>
> I think it would be the best way to just have a variable containing a
> list of services to start defined in the script-config file, and
> optionally having a hook to automatically invoke a certain script
> inside the chroot on session creation for more complex things.
One of the features in the new 1.5.2 release will be the ability to
set user-defined variables. These are then set as environment
variables in the setup script. So we can just add, for example:
[chroot]
session.services=postfix,apache
and then have a setup script do:
for service in $SESSION_SERVICES; do
chroot "$CHROOT_PATH" invoke-rc.d "$service" "$action"
done
where $action would be start for begin session, stop for
end session and restart for recover session (I think).
Does that sound OK?
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
More information about the Buildd-tools-devel
mailing list