File: ischroot.1

package info (click to toggle)
debianutils 4.8.1.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,412 kB
  • sloc: sh: 1,675; ansic: 841; makefile: 159
file content (37 lines) | stat: -rw-r--r-- 947 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.\" -*- nroff -*-
.TH ISCHROOT 1 "30 May 2011" "Debian"
.SH NAME
ischroot \- detect if running in a chroot
.SH SYNOPSIS
.B ischroot
[\-\-default\-false] [\-\-default\-true] [\-\-help] [\-\-version]
.SH DESCRIPTION
.PP
.B ischroot
detects if it is currently running in a chroot. The exit status is:
.TP
0
if currently running in a chroot
.TP
1
if currently not running in a chroot
.TP
2
if the detection is not possible (On GNU/Linux this happens if the
script is not run as root).
.SH OPTIONS
.TP
.B "-f, --default-false "
Exit with status 1 if the detection is not possible.
.TP
.B "-t, --default-true "
Exit with status 0 if the detection is not possible.
.TP
.B "--help"
Print a usage message on standard output and exit successfully.
.TP
.B "--version"
Print version information on standard output and exit successfully.
.SH BUGS
On GNU/Linux, chroot detection is not possible when not root. This
works correctly on GNU/Hurd and GNU/kFreeBSD.