chiark / gitweb /
Implement masking and overriding of generators
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Jan 2015 01:47:25 +0000 (20:47 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 11 Jan 2015 23:17:33 +0000 (18:17 -0500)
commite801700e9acdde60078eb1d41b41b06369b83541
tree356c3165b7ad9b5203584ff3e802f539b9873fa0
parent4968105790c65af58d4ab42bffa2a4bedc0be8ee
Implement masking and overriding of generators

Sometimes it is necessary to stop a generator from running. Either
because of a bug, or for testing, or some other reason. The only way
to do that would be to rename or chmod the generator binary, which is
inconvenient and does not survive upgrades. Allow masking and
overriding generators similarly to units and other configuration
files.

For the systemd instance, masking would be more common, rather than
overriding generators. For the user instances, it may also be useful
for users to have generators in $XDG_CONFIG_HOME to augment or
override system-wide generators.

Directories are searched according to the usual scheme (/usr/lib,
/usr/local/lib, /run, /etc), and files with the same name in higher
priority directories override files with the same name in lower
priority directories. Empty files and links to /dev/null mask a given
name.

https://bugs.freedesktop.org/show_bug.cgi?id=87230
src/core/manager.c
src/core/manager.h
src/core/shutdown.c
src/shared/path-lookup.c
src/shared/path-lookup.h
src/shared/util.c
src/shared/util.h
src/sleep/sleep.c
src/test/test-util.c