chiark / gitweb /
analyze: add 'cat-config' verb
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 26 Apr 2018 11:49:50 +0000 (13:49 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commitbc9e512db2edf97787aecdfafa922b1bbc142cc5
tree13aa52f934dc49b9feee43361d34d93c16304594
parent4db09749bd08031f56151d4dc068458117292b54
analyze: add 'cat-config' verb

This is used as 'systemd-analyze show-config systemd/logind.conf', which
will dump
   /etc/systemd/system/user@.service
   /etc/systemd/system/user@.service.d/*.conf
   /run/systemd/system/user@.service.d/*.conf
   /usr/local/lib/systemd/system/user@.service.d/*.conf
   /usr/lib/systemd/system/user@.service.d/*.conf

The idea is to make it easy to dump the configuration using the same locations
and order that systemd programs use themselves (including masking, in the right
order, etc.). This is the generic variant that works with any configuration
scheme that follows the same general rules:

$ systemd-analyze cat-config systemd/system.conf
$ systemd-analyze cat-config systemd/user.conf
$ systemd-analyze cat-config systemd/logind.conf
$ systemd-analyze cat-config systemd/sleep.conf
$ systemd-analyze cat-config systemd/journald.conf
$ systemd-analyze cat-config systemd/journal-remote.conf
$ systemd-analyze cat-config systemd/journal-upload.conf
$ systemd-analyze cat-config systemd/coredump.conf
$ systemd-analyze cat-config systemd/resolved.conf
$ systemd-analyze cat-config systemd/timesyncd.conf
$ systemd-analyze cat-config udev/udev.conf
src/basic/conf-files.c
src/basic/conf-files.h
src/basic/terminal-util.c
src/basic/terminal-util.h