aboutsummaryrefslogtreecommitdiffstats
path: root/man/consoletype.1
diff options
context:
space:
mode:
authorDavid Kaspar [Dee'Kej] <dkaspar@redhat.com>2018-05-25 20:01:54 +0200
committerDee'Kej <deekej@linuxmail.org>2018-05-30 12:32:22 +0200
commita145ddda284570e57413e37f025c3657205e17d8 (patch)
treea371338da02e38d8745964f75239c8ee62cc459b /man/consoletype.1
parentdb1ca2fadd20d0a4fb5a0fe18adcd8c960db9cf3 (diff)
downloadinitscripts-a145ddda284570e57413e37f025c3657205e17d8.tar
initscripts-a145ddda284570e57413e37f025c3657205e17d8.tar.gz
initscripts-a145ddda284570e57413e37f025c3657205e17d8.tar.bz2
initscripts-a145ddda284570e57413e37f025c3657205e17d8.tar.xz
initscripts-a145ddda284570e57413e37f025c3657205e17d8.zip
Repository scheme updated to new layout
NOTE: This commit just moves files around, without actually fixing the Makefiles and specfile. See follow up commits which resolve this.
Diffstat (limited to 'man/consoletype.1')
-rw-r--r--man/consoletype.144
1 files changed, 44 insertions, 0 deletions
diff --git a/man/consoletype.1 b/man/consoletype.1
new file mode 100644
index 00000000..ebd1d88c
--- /dev/null
+++ b/man/consoletype.1
@@ -0,0 +1,44 @@
+.TH CONSOLETYPE 1 "Red Hat, Inc" "RH" \" -*- nroff -*-
+.SH NAME
+\fBconsoletype
+\- print type of the console connected to standard input
+.SH SYNOPSIS
+\fBconsoletype [\fIstdout\fR] [\fIfg\fR]
+.SH DESCRIPTION
+\fBconsoletype
+prints the type of console connected to standard input, and checks
+whether the console connected to standard input is the current
+foreground virtual console. With no arguments, it prints
+\fIvt\fR
+if console is a virtual terminal (/dev/tty* or /dev/console device if not on
+a serial console),
+\fIserial\fR
+if standard input is a serial console (/dev/console or /dev/ttyS*) and
+\fIpty\fR
+if standard input is a pseudo terminal.
+.SH RETURN VALUE
+\fBconsoletype
+when passed no arguments returns
+.TP
+\fI0
+if on virtual terminal
+.TP
+\fI1
+if on serial console
+.TP
+\fI2
+if on a pseudo terminal.
+.TP
+When passed the \fIstdout\fR argument, \fBconsoletype\fR returns
+.TP
+\fI0
+in all cases, and prints the console type to stdout.
+.TP
+When passed the \fIfg\fR argument, \fBconsoletype\fR returns
+.TP
+\fI0
+if the console connected to standard input is the current virtual
+terminal
+.TP
+\fI1
+otherwise.