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

Re: How to detect if inside a buildd chroot



Anthony DeRobertis <anthony@derobert.net> writes:

> Roger Leigh wrote:
>> You can't reliably (or portably) check if you are in a chroot. 
> Hmm, if you're root you probably can. Something like this (completely
> untested; probably doesn't even compile):

I agree that this method would work.  But, can you detect it if you
are already /inside/ the chroot? i.e. chroot(2) has been called at
some point previously.


-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: pgpeYZnofSTZ8.pgp
Description: PGP signature


Reply to: