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

Re: How to detect if inside a buildd chroot

On Tue, 2007-09-25 at 13:14 +0300, Lars Wirzenius wrote:
> ti, 2007-09-25 kello 11:55 +0200, Simon Richter kirjoitti:
> > Sebastian Dröge schrieb:
> > > does somebody know about a solution to check whether one runs in a
> > > buildd chroot or not? I need this to prevent hal from starting in buildd
> > > chroots (via invoke-rc.d from postinst) as it breaks there because of
> > > several reasons, including no /sys mounted.
> > 
> > My chroots have /proc and /sys mounted, but I'd still be grateful if hal 
> > didn't start.
> Would policy-rc.d be helpful for this situation?
According to /usr/share/doc/sysv-rc/README.policy-rc.d all you need is
a /usr/sbin/policy-rc.d (inside the chroot) containing:
exit 101

Is there a reason the abovementioned isn't part of "standard" Debian
chroots such as those on buildds?
Edward Allcutt <ema29@srcf.ucam.org>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: