ischroot
detect if running in a chroot
Synopsis
ischroot
[--default-false]
[--default-true] [--help]
[--version]
add an example, a script, a trick and tips
examples
no example yet ...
... Feel free to add your own example above to help other Linux-lovers !
description
ischroot
detects if it is currently running in a chroot. The exit
status is:
0
if currently running in a chroot
1
if currently not running in a chroot
2
if the detection is not possible (On GNU/Linux this
happens if the script is not run as root).
options
-f,
--default-false
Exit with status 1 if the
detection is not possible.
-t, --default-true
Exit with status 0 if the
detection is not possible.
--help
Print a usage message on standard output and exit
successfully.
--version
Print version information on
standard output and exit successfully.
bugs
On GNU/Linux,
chroot detection is not possible when not root. This works
correctly on GNU/Hurd and GNU/kFreeBSD.