[Pkg-sysvinit-devel] Bug#699566: sysvinit: handle ischroot more gracefully

Yves-Alexis Perez corsac at debian.org
Fri Feb 1 21:17:36 UTC 2013


Package: sysvinit
Version: 2.88dsf-39
Severity: normal

Hi,

this is more or less the same thing as #665827: sysvinit postinst use
ischroot to detect if it's in a chroot, but it doesn't correctly test
the return value.

ischroot returns 0 if a chroot is detected, 1 if not, and 2 if it failed
to do the detection. It's a bit unfortunate, because usually people do
stuff like: ischroot && foo.

But usually when you fail to detect that you're in a chroot, it's
because you're in one but you're prevented to detect it. In those case,
I think it should be safer to *not* try to kill 1 because it won't work.

Regards,
-- 
Yves-Alexis


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-grsec-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sysvinit depends on:
ii  debianutils     4.3.4
ii  initscripts     2.88dsf-39
ii  libc6           2.13-38
ii  libselinux1     2.1.9-5
ii  libsepol1       2.1.4-3
ii  sysv-rc         2.88dsf-39
ii  sysvinit-utils  2.88dsf-39

sysvinit recommends no packages.

sysvinit suggests no packages.

-- no debconf information



More information about the Pkg-sysvinit-devel mailing list