summaryrefslogtreecommitdiffstats
path: root/term-utils
Commit message (Collapse)AuthorAgeFilesLines
* agetty: support /usr/lib/os-release tooKarel Zak2015-03-052-6/+10
| | | | | | | | | | | | http://www.freedesktop.org/software/systemd/man/os-release.html The file /etc/os-release takes precedence over /usr/lib/os-release. Applications should check for the former, and exclusively use its data if it exists, and only fall back to /usr/lib/os-release if it is missing. Reported-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix some spelling errors and typos in man pagesBill Pemberton2015-02-272-2/+2
| | | | | | | | | | | | | runuser.1: fix spelling implemenation -> implementation scriptreplay.1: fix spelling overide -> override unshare.1: fix spelling permamently -> permanently last.1: fix spelling preferrable -> preferable lslogins.1: fix spelling priviliges -> privileges hwclock.8.in: fix spelling transfered -> transferred prlimit.1: fix typo umlimited -> unlimited agetty.8: fix typo unnsupported -> unsupported Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
* rpmatch: use symbolic value when evaluation return codesSami Kerola2015-02-241-3/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib/strutils: extend parse_switch() to accept more optionsKarel Zak2015-02-241-12/+24
| | | | | | | * allow to specify more 0|1 pairs * allow to specify error message Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/strutils: move parse_switch() from setterm(1) to librarySami Kerola2015-02-241-16/+0Star
| | | | | | | To allow sharing the code with other utilities. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* script.1: Improve documentation of non-interactive behaviorStanislav Brabec2015-02-161-1/+7
| | | | | | | | | | | - use exit in .profile to avoid non-logged session after typing "exit" - document that script can read more from stdin than the command inside: echo -e 'script -c "read a b ; echo a=\$a b=\$b >defs.sh"\n1 2\necho Done' | sh Script started, file is typescript 1 2 echo Done Script done, file is typescript
* script: no logging for non-interactive shellsStanislav Brabec2015-02-121-0/+20
| | | | | | | | | | | | | | | | Karel Zak wrote: > Would be better to learn people to fix their shell initialization > files to not call script(1) for non-interactive sessions? It makes sense. From 8fff32e65399ae07f70e12568d4d5278725673a7 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec <sbrabec@suse.cz> Date: Wed, 11 Feb 2015 15:02:10 +0100 Subject: [PATCH] script.1: Document behavior in non-interactive shells And discourage users from such use.
* Fix "Script started" buffering raceStanislav Brabec2015-02-101-0/+1
| | | | | | | | | | | | | | | script -c "echo Hallo World" </dev/null >script.log ; cat script.log Before: Hallo World Script started, file is typescript Script started, file is typescript Script done, file is typescript After: Script started, file is typescript Hallo World Script done, file is typescript
* textual: grammarize and harmonize the stat error messageBenno Schulenberg2015-02-021-1/+1
| | | | | | | | | The message "stat failed %s" seems to say that stat() failed to do something, or failed to pass a test, but of course it means that the statting of something failed. So say so. Also make two very similar messages equal to this one. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* Merge branch 'opts' of https://github.com/jwpi/util-linuxKarel Zak2015-01-262-6/+6
|\
| * docs: restore minus symbols in long optsJ William Piggott2015-01-212-6/+6
| | | | | | | | Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | textual: fix spellos and inconsistencies in several program messagesBenno Schulenberg2015-01-261-3/+3
|/ | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: remove obsolete and unneeded comments from man-page filesBenno Schulenberg2015-01-123-9/+1Star
| | | | | | | Transform some of them into copyright lines. Also fix three header lines and snip some trailing whitespace. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: fix make checkincludes warningsSami Kerola2015-01-071-3/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-067-0/+25
| | | | | | | | | This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: don't use bold or italics for "[option]" in synopsis of man pagesBenno Schulenberg2014-12-191-4/+2Star
| | | | | | | As per the convention shown in Documentation/howto-man-page.txt. Also make a few other tiny adjustments along the way. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* agetty: use futimens, check for all in configure.acKarel Zak2014-11-211-7/+1Star
| | | | | | | | | | | It seems better to warn about --reload in ./configure if futimens or inotify_init1 are missing. The patch also replaces futimes() with futimens() to make the code compatible with Uclibc. Addresses: https://github.com/karelzak/util-linux/issues/133 Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: fix typoKarel Zak2014-11-211-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: keep the current baud before try 9600 on serial linesKarel Zak2014-11-212-4/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: don't ignore TERMKarel Zak2014-11-211-2/+4
| | | | | | | | | Fix command line parsing to not ignore term setting if no baud specified, for example: /sbin/agetty ttyS0 vt100 Signed-off-by: Karel Zak <kzak@redhat.com>
* aggety: always set default serial line speedKarel Zak2014-11-201-4/+11
| | | | | | | | | * makes speeds table usage more robust * don't call next_speed() for empty speeds table to avoid division by zero * default to 9600 when port baud unspecified Addresses: https://github.com/karelzak/util-linux/pull/131 Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: fix dubious one-bit signed bitfield [smatch scan]Sami Kerola2014-10-201-3/+4
| | | | | | term-utils/setterm.c:165:24: error: dubious one-bit signed bitfield Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: may be hangsAndreas Henriksson2014-10-141-4/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: use usage() text element macrosSami Kerola2014-10-013-8/+8
| | | | | | | Translating these text elements should happen only once, which is more likely when the text macros are used properly. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use manual tail usage() macroSami Kerola2014-10-013-0/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use version printing macro everywhereSami Kerola2014-10-014-9/+4Star
| | | | | | | Only mount, umount, and blkid remains not using the macro because they are print also library references. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: use -lutil for BSD onlyKarel Zak2014-09-171-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: fixing FTBFS on !linux (Debian util-linux 2.20.1-1.2)Christoph Egger2014-09-172-0/+17
| | | | | | | Handle vc flags missing on FreeBSD Fix tty creation on kFreeBSD taking patch from 2.19 Addresses-Debian-Bug: #650185
* textual: remove some inconsistent periods from error messagesBenno Schulenberg2014-08-111-1/+1
| | | | | | While doing so, also improve translatability and some wordings. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* Revert "wall: wrap message header when it exceeds 79 characters"Karel Zak2014-07-291-6/+1Star
| | | | | | This reverts commit 93d7baf250495b2385c369afd48137a7363ae4c2. Ooops... it wasn't my plan to merge this patch. Sorry.
* wall: wrap message header when it exceeds 79 charactersSami Kerola2014-07-281-1/+6
| | | | | | | | Header truncation started to happen more often after commit d81c30553f4fb49173d38f69edff4b0b67a18b65 that made the header to be longer. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: Reprompt and reprint /etc/issue when askedStef Walter2014-07-282-12/+135
| | | | | | | | | | | | | | | | | | | | | Add an 'agetty --reload' command which asks all running agetty commands to display their prompts again. Several of the /etc/issue escape codes such as \4 and \S depend on variable data which can change after the agetty prompt is displayed. This can cause stale data to be displayed when a user looks at a VT, especially in cases of DHCP racing with system start up. We never want this to occur once the user has started typing a user name. So we detect when the user starts typing, after which no further reprompting occurs after that point. [kzak@redhat.com: - add #ifdefs to make it usable on non-inotify systems, - use futimens() with NULL timespec - add --reaload to usage()] Signed-off-by: Stef Walter <stefw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: add fallback for failed sysconf()Karel Zak2014-07-171-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: bring a few more man pages closer to standard formattingBenno Schulenberg2014-07-167-55/+53Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* setterm: remove unnecessary variableSami Kerola2014-07-131-2/+1Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: improve formatting and wording of usage textBenno Schulenberg2014-06-301-17/+17
| | | | | | | | Mainly: showing that the word color is a placeholder by writing <color>, showing some numbers as optional, and message levels and colors as not optional. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* setterm: improve wording and formatting of the man pageBenno Schulenberg2014-06-301-71/+76
| | | | | | | | The main changes are: showing the arguments of boolean options as optional, improving the alphabetization, and restoring the --half-bright option that went missing in 2011. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* script: clean up code to genenrate Star/Done messagesKarel Zak2014-06-231-9/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* script: silence the done message on --quiet as wellAndreas Henriksson2014-06-231-1/+2
| | | | | | | | | | Apparently James Hunts patch (which he provided a long time ago) is no longer covering it all. This followup patch also silences the "Script done ..." message when --quiet is used. Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* script: --quiet option is not quiet.James Hunt2014-06-232-2/+4
| | | | | | | | | | | Specifying 'script --quiet ...' still produces the 'Script started' message in the typescript file. The --quiet option implies that the script program should not log any of its output to the typescript file. Originally reported at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693966 Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* build-sys: fixes for non-Linux systemsSamuel Thibault2014-06-191-1/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix "behaviour" vs. "behavior"Karel Zak2014-06-062-2/+2
| | | | | | | | Sometimes we use "behaviour" and "behavior" in the same text, let's use "behavior" only everywhere. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068 Signed-off-by: Karel Zak <kzak@redhat.com>
* script: fix spurious exit from input read loop on EINTR.Csaba Kos2014-06-021-1/+2
|
* script: fix a rare deadlock after child terminationCsaba Kos2014-06-021-8/+45
|
* docs: setterm.1 clean up manual page groff styleSami Kerola2014-05-261-103/+164
| | | | | | | | Underline option arguments, and use bold for options. Avoid use of \f font style change in paragraphs, but use them when describing options. Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: setterm.1 add options compatibility noteSami Kerola2014-05-261-1/+11
| | | | | | | Both --option and -option formats are accepted. Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: setterm.1 add missing options to manual page and remove duplicateSami Kerola2014-05-261-4/+16
| | | | | Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: add usage() descriptionsSami Kerola2014-05-261-34/+35
| | | | | Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: add BUILD_{SCRIPT,SCRIPTREPLAY}Karel Zak2014-05-211-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: fix 'bright' in usage, remove unnecessary error messageKarel Zak2014-05-201-5/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>