[buildd-tools-devel] Bug#625205: is there a way to automatically start services inside an schroot session?

Marc Haber mh+debian-bugs at zugschlus.de
Mon May 2 13:48:52 UTC 2011


Package: schroot
Version: 1.4.21-1+b1
Severity: wishlist

Hi,

I would like to automatically start an schroot session on bootup, and
start two services inside that schroot session. I am wondering whether
schroot does have the mechanisms to do this automatically, or whether
I would have to take my own provisions to have the services started.

I am aware that I could easily have my own init script with

start)
  SESS="$(schroot --begin-session --chroot=my_chroot)"
  schroot --run-session --chroot=$SESS sudo service foo start
  schroot --run-session --chroot=$SESS sudo service bar start
  echo $SESS > /var/run/schroot.foobar.session
  ;;
stop)
  SESS="$(cat /var/run/schroot.foobar.session)"
  schroot --run-session --chroot=$SESS sudo service bar stop
  schroot --run-session --chroot=$SESS sudo service foo stop
  schroot --end-sessino --chroot=$SESS
  ;;


but I am wondering whether schroot has possibilities to do this any
easier, for example with a script run from script-config.

What is the correct schroot way to do things?

Greetings
Marc





More information about the Buildd-tools-devel mailing list