[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Daemons in schroot or how to start chroot automatically



On Sun, Jul 22, 2012 at 03:25:49PM +0200, Ramon Hofer wrote:
> On Sam, 2012-07-21 at 22:05 +0100, Roger Leigh wrote:
> > 
> > Firstly, add schroot to Required-(Start|Stop), since you do
> > need it to be set up prior to starting new sessions.
> 
> Thanks for the hint!
> I added $schroot at the end (don't know if the ordering matters...)

It's "schroot", not "$schroot".  '$' means it's a virtual
service provided by another script; without the '$' means the
script itself.  e.g. "$network" is provided by "ifupdown".

> > I would also check the return status of schroot.  If sid-sab
> > already exists, then session creation will fail, and you'll
> > reuse the old session.  That might not be incorrect, but
> > in the general case, I'd recommend checking.
> 
> I was thinking about this too. But I saw no need to create a new session
> if the old is still there.
> What could be drawbacks of doing so?

None really; they can even persist across reboots.  (That's what
the "recover-session" action is for.)

> > What "talking" are you seeing?  --quiet should hide all the
> > messages, unless there's a problem.
> 
> I have tried this
> $NAME=$(schroot -bq -n $NAME -c $SCHROOT)
> 
> But when the init.d script is called the second time with start then it
> return
> E: /etc/init.d/sabnzbdplus: Chroot not found
> 
> That's why I have added >/dev/null to the creation command
> schroot -bq -n $NAME -c $SCHROOT >/dev/null

"/etc/init.d/sabnzbdplus" is an odd name for a chroot; It's not
even valid to have '/' in the name IIRC.  Is "$NAME" correct here?

-- 
  .''`.  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


Reply to: