From 960787ae27af395c28fb1ce9de5a575ebfb27a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 14 Aug 2013 18:55:11 -0400 Subject: hostnamectl: show only specific hostname when requested Existing --pretty, --transient, --static options, used previously for 'set-hostname' verb, are reused for the 'status' verb. If one of them is given, only the specified hostname is printed. This way there's no need to employ awk to get the hostname in a script. --- man/hostnamectl.xml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'man/hostnamectl.xml') diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml index f28e430a4..b39fb5502 100644 --- a/man/hostnamectl.xml +++ b/man/hostnamectl.xml @@ -49,7 +49,9 @@ - hostnamectl OPTIONS COMMAND + hostnamectl + OPTIONS + COMMAND @@ -81,7 +83,7 @@ /etc/hostname, see hostname5 for more information. The pretty hostname, chassis - type and icon name are stored in + type, and icon name are stored in /etc/machine-info, see machine-id5. @@ -141,11 +143,20 @@ If - set-hostname is - invoked and one or more of these - options are passed, only the selected - hostname(s) is/are - updated. + status is used (or + no explicit command is given) and one + of those fields is given, + hostnamectl will + print out just this selected + hostname. + + If used with + set-hostname, only + the selected hostname(s) will be + updated. When more than one of those + options is used, all the specified + hostnames will be updated. + -- cgit v1.2.3