From d1dbf40d47cfa883c4c9fa264dfd84cd57a03b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Apr 2018 17:09:58 +0200 Subject: man: add a new page with a general description of common syntax We have a common parser, but for the user it might be completely unobvious that the same general rules apply to all those files. Let's add a page about the basic syntax so that the more specific pages don't have to repeat those details. --- man/elogind.syntax.xml | 107 +++++++++++++++++++++++++++++++++++++++++++++++++ man/logind.conf.xml | 8 ++-- man/rules/meson.build | 3 +- 3 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 man/elogind.syntax.xml diff --git a/man/elogind.syntax.xml b/man/elogind.syntax.xml new file mode 100644 index 000000000..a6fc8bab6 --- /dev/null +++ b/man/elogind.syntax.xml @@ -0,0 +1,107 @@ + + +%entities; +]> + + + + + + + elogind.syntax + elogind + + + + A. U. Thor + Zbigniew + Jędrzejewski-Szmek + zbyszek@in.waw.pl + + + + + + elogind.syntax + 7 + + + + elogind.syntax + General syntax of elogind configuration files + + + + Introduction + + This page describes the basic principles of configuration files used by + elogind1 + and related programs for: + + elogind unit files, see + elogind.unit5, + elogind.service5, + elogind.socket5, + elogind.device5, + elogind.mount5, + elogind.automount5, + elogind.swap5, + elogind.target5, + elogind.path5, + elogind.timer5, + elogind.slice5, + elogind.scope5 + + daemon config files, see + elogind-system.conf5, + elogind-user.conf5, + logind.conf5, + journald.conf5, + journal-remote.conf5, + journal-upload.conf5, + elogind-sleep.conf5, + timesyncd.conf5 + + + + + The syntax is inspired by + XDG Desktop Entry Specification + .desktop files, which are in turn inspired by Microsoft Windows + .ini files. + + + Each file is a plain text file divided into sections, with configuration entries in the + style key=value. + Empty lines and lines starting with # or ; are + ignored, which may be used for commenting. + + Lines ending in a backslash are concatenated with the following line while reading and the + backslash is replaced by a space character. This may be used to wrap long lines. The limit on + line length is very large (currently 1 MB), but it is recommended to avoid such long lines and + use multiple directives, variable substitution, or other mechanism as appropriate for the given + file type. + + [Section A] +KeyOne=value 1 +KeyTwo=value 2 + +# a comment + +[Section B] +Setting="something" "some thing" "…" +KeyTwo=value 2 \ + value 2 continued + + + Various settings are allowed to be specified more than once, in which case the + interpretation depends on the setting. Often, multiple settings form a list, and setting to an + empty value "resets", which means that previous assignments are ignored. When this is allowed, + it is mentioned in the description of the setting. Note that using multiple assignments to the + same value makes the file incompatible with parsers for the XDG .desktop + file format. + + + diff --git a/man/logind.conf.xml b/man/logind.conf.xml index 4a9cc563a..82789cdcb 100644 --- a/man/logind.conf.xml +++ b/man/logind.conf.xml @@ -61,11 +61,11 @@ Description - These files configure various parameters of the elogind login manager. diff --git a/man/rules/meson.build b/man/rules/meson.build index ce3a6c546..1adf73560 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -630,9 +630,9 @@ manpages = [ ['elogind-sysctl.service', '8', ['elogind-sysctl'], ''], ['elogind-system-update-generator', '8', [], ''], ['elogind-system.conf', - '8', 'elogind-sleep', 'elogind-suspend-then-hibernate.service'], + '8', ''], '5', ['system.conf.d', 'elogind-user.conf', 'user.conf.d'], @@ -703,6 +703,7 @@ manpages = [ ['elogind.time', '7', [], ''], ['elogind.timer', '5', [], ''], ['elogind.unit', '5', [], ''], + ['elogind.syntax', '7', [], ''], ['sysusers.d', '5', [], 'ENABLE_SYSUSERS'], ['telinit', '8', [], ''], ['timedatectl', '1', [], 'ENABLE_TIMEDATED'], -- cgit v1.2.3