]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hostnamectl: document JSON status object output
authordongshengyuan <545258830@qq.com>
Wed, 22 Jul 2026 09:23:16 +0000 (17:23 +0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Jul 2026 03:19:48 +0000 (12:19 +0900)
status with --static, --pretty, or --transient prints only the
selected hostname in regular output. JSON status output is built from
hostnamed's Describe data and remains a full status object.

Document this distinction so callers do not expect the name type
switches to turn JSON status into a single scalar value.

Follow-up for: ac8a4f6b78fe70680d3bc1704b1f85bbcbe7bb55

man/hostnamectl.xml

index 4c1d3cf245ec41cb49a7fe17c852f9493515693f..7625d3908d6bfcb10913fcb6f59b094b0609793a 100644 (file)
         <listitem><para>If <command>status</command> is invoked (or no explicit command is given) and one of these
         switches is specified, <command>hostnamectl</command> will print out just this selected hostname.</para>
 
+        <para>This selection does not apply to JSON output: with <option>--json=</option>,
+        <command>status</command> always prints the full status object.</para>
+
         <para>If used with <command>hostname</command>, only the selected hostnames will be updated. When more
         than one of these switches are specified, all the specified hostnames will be updated. </para>