ischroot - detect if running in a chroot
ischroot [--default-false] [--default-true] [--help] [--version]
ischroot detects if it is currently running in a chroot. The exit status is:
if currently running in a chroot
if currently not running in a chroot
if the detection is not possible (On GNU/Linux this happens if the script is not run as root).
Exit with status 1 if the detection is not possible.
Exit with status 0 if the detection is not possible.
Print a usage message on standard output and exit successfully.
Print version information on standard output and exit successfully.
On GNU/Linux, chroot detection is not possible when not root. This works correctly on GNU/Hurd and GNU/kFreeBSD.