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

How to detect we are in a chroot? (was Re: Bug#543938: telinit: /etc/.initctl: ENOENT breaks debootstrap on kfreebsd)

On Thu, Aug 27, 2009 at 04:54:47PM +0200, Philipp Kern wrote:
> Package: libsepol1
> Version: 2.0.37-2
> Severity: important
> I just tried to install kfreebsd-amd64 using d-i and debootstrap bailed
> out due to libsepol1 failing to configure:
> debootstrap: Setting up libsepol1 (2.0.37-2)
> debootstrap: telinit:
> debootstrap: /etc/.initctl: No such file or directory
> debootstrap: dpkg: error processing libsepol1 (--configure):
> debootstrap:  subprocess installed post-installation script error exit status 1
> I suspect that the recently uploaded version broke this.

As discussed on IRC, that's due to the test:

"$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)"

On GNU/kFreeBSD this test is always true. Any idea how to detect we are
running on a chroot?

Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

Reply to: