summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CODING_STYLE21
-rw-r--r--Makefile.am124
-rw-r--r--NEWS15
-rw-r--r--README13
-rw-r--r--configure.ac30
-rw-r--r--m4/ax_normalize_path.m4115
-rw-r--r--man/binfmt.d.xml5
-rw-r--r--man/bootchart.conf.xml17
-rw-r--r--man/bootctl.xml5
-rw-r--r--man/bootup.xml5
-rw-r--r--man/busctl.xml5
-rw-r--r--man/coredump.conf.xml11
-rw-r--r--man/coredumpctl.xml5
-rw-r--r--man/crypttab.xml5
-rw-r--r--man/daemon.xml5
-rw-r--r--man/file-hierarchy.xml5
-rw-r--r--man/halt.xml5
-rw-r--r--man/hostname.xml5
-rw-r--r--man/hostnamectl.xml5
-rw-r--r--man/hwdb.xml13
-rw-r--r--man/journal-remote.conf.xml13
-rw-r--r--man/journalctl.xml5
-rw-r--r--man/journald.conf.xml11
-rw-r--r--man/kernel-command-line.xml5
-rw-r--r--man/kernel-install.xml5
-rw-r--r--man/less-variables.xml5
-rw-r--r--man/libsystemd-pkgconfig.xml5
-rw-r--r--man/locale.conf.xml5
-rw-r--r--man/localectl.xml5
-rw-r--r--man/localtime.xml5
-rw-r--r--man/loginctl.xml5
-rw-r--r--man/logind.conf.xml11
-rw-r--r--man/machine-id.xml5
-rw-r--r--man/machine-info.xml5
-rw-r--r--man/machinectl.xml9
-rw-r--r--man/modules-load.d.xml5
-rw-r--r--man/networkctl.xml5
-rw-r--r--man/nss-myhostname.xml5
-rw-r--r--man/nss-mymachines.xml5
-rw-r--r--man/os-release.xml5
-rw-r--r--man/pam_systemd.xml5
-rw-r--r--man/resolved.conf.xml11
-rw-r--r--man/runlevel.xml5
-rw-r--r--man/sd-daemon.xml5
-rw-r--r--man/sd-id128.xml5
-rw-r--r--man/sd-journal.xml5
-rw-r--r--man/sd-login.xml5
-rw-r--r--man/sd_booted.xml5
-rw-r--r--man/sd_bus_creds_get_pid.xml5
-rw-r--r--man/sd_bus_creds_new_from_pid.xml5
-rw-r--r--man/sd_bus_default.xml5
-rw-r--r--man/sd_bus_error.xml5
-rw-r--r--man/sd_bus_message_append.xml5
-rw-r--r--man/sd_bus_message_append_array.xml5
-rw-r--r--man/sd_bus_message_append_basic.xml5
-rw-r--r--man/sd_bus_message_append_string_memfd.xml5
-rw-r--r--man/sd_bus_message_append_strv.xml5
-rw-r--r--man/sd_bus_message_get_cookie.xml5
-rw-r--r--man/sd_bus_message_get_monotonic_usec.xml5
-rw-r--r--man/sd_bus_negotiate_fds.xml5
-rw-r--r--man/sd_bus_new.xml5
-rw-r--r--man/sd_bus_path_encode.xml5
-rw-r--r--man/sd_bus_request_name.xml5
-rw-r--r--man/sd_event_add_child.xml5
-rw-r--r--man/sd_event_add_defer.xml5
-rw-r--r--man/sd_event_add_signal.xml5
-rw-r--r--man/sd_event_add_time.xml5
-rw-r--r--man/sd_event_get_fd.xml5
-rw-r--r--man/sd_event_new.xml5
-rw-r--r--man/sd_event_run.xml5
-rw-r--r--man/sd_event_set_name.xml5
-rw-r--r--man/sd_event_wait.xml5
-rw-r--r--man/sd_get_seats.xml5
-rw-r--r--man/sd_id128_get_machine.xml5
-rw-r--r--man/sd_id128_randomize.xml5
-rw-r--r--man/sd_id128_to_string.xml5
-rw-r--r--man/sd_is_fifo.xml5
-rw-r--r--man/sd_journal_add_match.xml5
-rw-r--r--man/sd_journal_get_catalog.xml5
-rw-r--r--man/sd_journal_get_cursor.xml5
-rw-r--r--man/sd_journal_get_cutoff_realtime_usec.xml5
-rw-r--r--man/sd_journal_get_data.xml5
-rw-r--r--man/sd_journal_get_fd.xml5
-rw-r--r--man/sd_journal_get_realtime_usec.xml5
-rw-r--r--man/sd_journal_get_usage.xml5
-rw-r--r--man/sd_journal_next.xml5
-rw-r--r--man/sd_journal_open.xml5
-rw-r--r--man/sd_journal_print.xml5
-rw-r--r--man/sd_journal_query_unique.xml5
-rw-r--r--man/sd_journal_seek_head.xml5
-rw-r--r--man/sd_journal_stream_fd.xml5
-rw-r--r--man/sd_listen_fds.xml5
-rw-r--r--man/sd_login_monitor_new.xml5
-rw-r--r--man/sd_machine_get_class.xml5
-rw-r--r--man/sd_notify.xml5
-rw-r--r--man/sd_pid_get_session.xml5
-rw-r--r--man/sd_seat_get_active.xml5
-rw-r--r--man/sd_session_is_active.xml5
-rw-r--r--man/sd_uid_get_state.xml5
-rw-r--r--man/sd_watchdog_enabled.xml5
-rw-r--r--man/shutdown.xml5
-rw-r--r--man/standard-conf.xml9
-rw-r--r--man/standard-options.xml5
-rw-r--r--man/sysctl.d.xml7
-rw-r--r--man/systemctl.xml9
-rw-r--r--man/systemd-activate.xml11
-rw-r--r--man/systemd-analyze.xml5
-rw-r--r--man/systemd-ask-password-console.service.xml5
-rw-r--r--man/systemd-ask-password.xml5
-rw-r--r--man/systemd-backlight@.service.xml7
-rw-r--r--man/systemd-binfmt.service.xml7
-rw-r--r--man/systemd-bootchart.xml13
-rw-r--r--man/systemd-bus-proxyd.xml7
-rw-r--r--man/systemd-bus-proxyd@.service.xml5
-rw-r--r--man/systemd-cat.xml5
-rw-r--r--man/systemd-cgls.xml5
-rw-r--r--man/systemd-cgtop.xml5
-rw-r--r--man/systemd-coredump.xml7
-rw-r--r--man/systemd-cryptsetup-generator.xml7
-rw-r--r--man/systemd-cryptsetup@.service.xml7
-rw-r--r--man/systemd-debug-generator.xml7
-rw-r--r--man/systemd-delta.xml5
-rw-r--r--man/systemd-detect-virt.xml5
-rw-r--r--man/systemd-efi-boot-generator.xml7
-rw-r--r--man/systemd-escape.xml5
-rw-r--r--man/systemd-firstboot.xml5
-rw-r--r--man/systemd-fsck@.service.xml7
-rw-r--r--man/systemd-fstab-generator.xml7
-rw-r--r--man/systemd-getty-generator.xml7
-rw-r--r--man/systemd-gpt-auto-generator.xml7
-rw-r--r--man/systemd-halt.service.xml11
-rw-r--r--man/systemd-hibernate-resume-generator.xml7
-rw-r--r--man/systemd-hibernate-resume@.service.xml7
-rw-r--r--man/systemd-hostnamed.service.xml7
-rw-r--r--man/systemd-hwdb.xml7
-rw-r--r--man/systemd-inhibit.xml5
-rw-r--r--man/systemd-initctl.service.xml7
-rw-r--r--man/systemd-journal-gatewayd.service.xml7
-rw-r--r--man/systemd-journal-remote.xml5
-rw-r--r--man/systemd-journal-upload.xml9
-rw-r--r--man/systemd-journald.service.xml9
-rw-r--r--man/systemd-localed.service.xml7
-rw-r--r--man/systemd-logind.service.xml7
-rw-r--r--man/systemd-machine-id-commit.service.xml7
-rw-r--r--man/systemd-machine-id-commit.xml5
-rw-r--r--man/systemd-machine-id-setup.xml5
-rw-r--r--man/systemd-machined.service.xml7
-rw-r--r--man/systemd-modules-load.service.xml7
-rw-r--r--man/systemd-networkd-wait-online.service.xml7
-rw-r--r--man/systemd-networkd.service.xml11
-rw-r--r--man/systemd-notify.xml5
-rw-r--r--man/systemd-nspawn.xml5
-rw-r--r--man/systemd-path.xml5
-rw-r--r--man/systemd-quotacheck.service.xml7
-rw-r--r--man/systemd-random-seed.service.xml7
-rw-r--r--man/systemd-remount-fs.service.xml7
-rw-r--r--man/systemd-resolved.service.xml7
-rw-r--r--man/systemd-rfkill@.service.xml7
-rw-r--r--man/systemd-run.xml5
-rw-r--r--man/systemd-sleep.conf.xml13
-rw-r--r--man/systemd-socket-proxyd.xml9
-rw-r--r--man/systemd-suspend.service.xml13
-rw-r--r--man/systemd-sysctl.service.xml7
-rw-r--r--man/systemd-system-update-generator.xml7
-rw-r--r--man/systemd-system.conf.xml17
-rw-r--r--man/systemd-sysusers.xml5
-rw-r--r--man/systemd-sysv-generator.xml7
-rw-r--r--man/systemd-timedated.service.xml7
-rw-r--r--man/systemd-timesyncd.service.xml7
-rw-r--r--man/systemd-tmpfiles.xml5
-rw-r--r--man/systemd-tty-ask-password-agent.xml5
-rw-r--r--man/systemd-udevd.service.xml7
-rw-r--r--man/systemd-update-done.service.xml7
-rw-r--r--man/systemd-update-utmp.service.xml7
-rw-r--r--man/systemd-user-sessions.service.xml7
-rw-r--r--man/systemd-vconsole-setup.service.xml7
-rw-r--r--man/systemd.automount.xml5
-rw-r--r--man/systemd.device.xml5
-rw-r--r--man/systemd.exec.xml5
-rw-r--r--man/systemd.generator.xml4
-rw-r--r--man/systemd.journal-fields.xml5
-rw-r--r--man/systemd.kill.xml5
-rw-r--r--man/systemd.link.xml15
-rw-r--r--man/systemd.mount.xml5
-rw-r--r--man/systemd.netdev.xml31
-rw-r--r--man/systemd.network.xml29
-rw-r--r--man/systemd.path.xml5
-rw-r--r--man/systemd.preset.xml21
-rw-r--r--man/systemd.resource-control.xml5
-rw-r--r--man/systemd.scope.xml5
-rw-r--r--man/systemd.service.xml5
-rw-r--r--man/systemd.slice.xml7
-rw-r--r--man/systemd.snapshot.xml5
-rw-r--r--man/systemd.socket.xml5
-rw-r--r--man/systemd.special.xml5
-rw-r--r--man/systemd.swap.xml5
-rw-r--r--man/systemd.target.xml5
-rw-r--r--man/systemd.time.xml5
-rw-r--r--man/systemd.timer.xml5
-rw-r--r--man/systemd.unit.xml30
-rw-r--r--man/systemd.xml7
-rw-r--r--man/sysusers.d.xml5
-rw-r--r--man/telinit.xml5
-rw-r--r--man/timedatectl.xml9
-rw-r--r--man/timesyncd.conf.xml11
-rw-r--r--man/tmpfiles.d.xml5
-rw-r--r--man/udev.conf.xml5
-rw-r--r--man/udev.xml13
-rw-r--r--man/udevadm.xml5
-rw-r--r--man/user-system-options.xml5
-rw-r--r--man/vconsole.conf.xml5
-rw-r--r--po/es.po4
-rw-r--r--rules/60-block.rules2
-rw-r--r--rules/60-persistent-storage.rules2
-rw-r--r--shell-completion/zsh/_bootctl7
-rw-r--r--src/console/consoled-manager.c11
-rw-r--r--src/console/consoled.c5
-rw-r--r--src/core/automount.c2
-rw-r--r--src/core/busname.c5
-rw-r--r--src/core/dbus-kill.c4
-rw-r--r--src/core/execute.c6
-rw-r--r--src/core/kill.c4
-rw-r--r--src/core/load-fragment.c3
-rw-r--r--src/core/machine-id-setup.c2
-rw-r--r--src/core/main.c9
-rw-r--r--src/core/manager.c13
-rw-r--r--src/core/mount-setup.c2
-rw-r--r--src/core/namespace.c2
-rw-r--r--src/core/service.c1
-rw-r--r--src/core/socket.c3
-rw-r--r--src/efi-boot-generator/efi-boot-generator.c2
-rw-r--r--src/fsck/fsck.c1
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c2
-rw-r--r--src/import/export.c1
-rw-r--r--src/import/import-common.c1
-rw-r--r--src/import/import.c1
-rw-r--r--src/import/importd.c1
-rw-r--r--src/import/pull-common.c1
-rw-r--r--src/import/pull.c1
-rw-r--r--src/journal-remote/journal-remote.c1
-rw-r--r--src/journal-remote/journal-upload.c3
-rw-r--r--src/journal/coredumpctl.c1
-rw-r--r--src/journal/journald-server.c9
-rw-r--r--src/kernel-install/90-loaderentry.install6
-rw-r--r--src/libsystemd-terminal/evcat.c11
-rw-r--r--src/libsystemd-terminal/grdev-drm.c10
-rw-r--r--src/libsystemd-terminal/grdev-internal.h6
-rw-r--r--src/libsystemd-terminal/grdev.c8
-rw-r--r--src/libsystemd-terminal/grdev.h4
-rw-r--r--src/libsystemd-terminal/idev-evdev.c8
-rw-r--r--src/libsystemd-terminal/idev-internal.h6
-rw-r--r--src/libsystemd-terminal/idev-keyboard.c10
-rw-r--r--src/libsystemd-terminal/idev.c8
-rw-r--r--src/libsystemd-terminal/idev.h4
-rw-r--r--src/libsystemd-terminal/modeset.c14
-rw-r--r--src/libsystemd-terminal/subterm.c7
-rw-r--r--src/libsystemd-terminal/sysview-internal.h6
-rw-r--r--src/libsystemd-terminal/sysview.c12
-rw-r--r--src/libsystemd-terminal/sysview.h4
-rw-r--r--src/libsystemd/sd-bus/bus-control.c2
-rw-r--r--src/libsystemd/sd-bus/bus-creds.c6
-rw-r--r--src/libsystemd/sd-bus/bus-socket.c3
-rw-r--r--src/libsystemd/sd-bus/bus-util.c1
-rw-r--r--src/libsystemd/sd-device/device-enumerator.c6
-rw-r--r--src/libsystemd/sd-device/device-private.c29
-rw-r--r--src/libsystemd/sd-event/sd-event.c1
-rw-r--r--src/libsystemd/sd-event/test-event.c1
-rw-r--r--src/login/loginctl.c1
-rw-r--r--src/login/logind-dbus.c5
-rw-r--r--src/login/logind-user.c2
-rw-r--r--src/login/logind.c5
-rw-r--r--src/machine/machinectl.c1
-rw-r--r--src/machine/machined.c3
-rw-r--r--src/network/networkctl.c2
-rw-r--r--src/network/networkd-wait-online.c5
-rw-r--r--src/network/networkd.c4
-rw-r--r--src/nspawn/nspawn.c11
-rw-r--r--src/remount-fs/remount-fs.c1
-rw-r--r--src/resolve/resolved.c1
-rw-r--r--src/run/run.c1
-rw-r--r--src/shared/architecture.c2
-rw-r--r--src/shared/architecture.h2
-rw-r--r--src/shared/ask-password-api.c2
-rw-r--r--src/shared/capability.h2
-rw-r--r--src/shared/cgroup-util.c2
-rw-r--r--src/shared/condition.c2
-rw-r--r--src/shared/conf-parser.c2
-rw-r--r--src/shared/fdset.c2
-rw-r--r--src/shared/log.c1
-rw-r--r--src/shared/machine-pool.c3
-rw-r--r--src/shared/path-util.c34
-rw-r--r--src/shared/path-util.h4
-rw-r--r--src/shared/process-util.c3
-rw-r--r--src/shared/pty.c3
-rw-r--r--src/shared/random-util.c2
-rw-r--r--src/shared/rm-rf.c2
-rw-r--r--src/shared/signal-util.c228
-rw-r--r--src/shared/signal-util.h41
-rw-r--r--src/shared/util.c207
-rw-r--r--src/shared/util.h16
-rw-r--r--src/systemctl/systemctl.c23
-rwxr-xr-xsrc/systemctl/systemd-sysv-install.SKELETON47
-rw-r--r--src/test/test-conf-parser.c234
-rw-r--r--src/test/test-fdset.c53
-rw-r--r--src/test/test-path-util.c76
-rw-r--r--src/test/test-pty.c1
-rw-r--r--src/test/test-udev.c7
-rw-r--r--src/test/test-unit-file.c19
-rw-r--r--src/test/test-util.c1
-rw-r--r--src/timesync/timesyncd.c1
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c1
-rw-r--r--src/udev/udev-event.c193
-rw-r--r--src/udev/udev.h2
-rw-r--r--src/udev/udevadm-test.c8
-rw-r--r--src/udev/udevd.c534
-rw-r--r--tmpfiles.d/legacy.conf2
-rw-r--r--units/systemd-udevd.service.in1
318 files changed, 2544 insertions, 1222 deletions
diff --git a/.gitignore b/.gitignore
index d2f1a1f9d6..e26931b1b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -175,6 +175,7 @@
/test-compress-benchmark
/test-condition
/test-conf-files
+/test-conf-parser
/test-copy
/test-coredump-vacuum
/test-daemon
diff --git a/CODING_STYLE b/CODING_STYLE
index 91f09e80a8..bdec988ce6 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -292,3 +292,24 @@
- When returning a return code from main(), please preferably use
EXIT_FAILURE and EXIT_SUCCESS as defined by libc.
+
+- The order in which header files are included doesn't matter too
+ much. However, please try to include the headers of external
+ libraries first (these are all headers enclosed in <>), followed by
+ the headers of our own public headers (these are all headers
+ starting with "sd-"), internal utility libraries from src/shared/,
+ followed by the headers of the specific component. Or in other
+ words:
+
+ #include <stdio.h>
+ #include "sd-daemon.h"
+ #include "util.h"
+ #include "frobnicator.h"
+
+ Where stdio.h is a public glibc API, sd-daemon.h is a public API of
+ our own, util.h is a utility library header from src/shared, and
+ frobnicator.h is an placeholder name for any systemd component. The
+ benefit of following this ordering is that more local definitions
+ are always defined after more global ones. Thus, our local
+ definitions will never "leak" into the global header files, possibly
+ altering their effect due to #ifdeffery.
diff --git a/Makefile.am b/Makefile.am
index d6010c5cc2..43b819bf9b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -627,6 +627,7 @@ systemgenerator_PROGRAMS += \
endif
EXTRA_DIST += \
+ src/systemctl/systemd-sysv-install.SKELETON \
units/rc-local.service.in \
units/halt-local.service.in
@@ -721,12 +722,6 @@ man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
-EXTRA_DIST += \
- man/systemd.index.xml \
- man/index.html \
- man/systemd.directives.xml \
- man/glib-event-glue.c
-
CLEANFILES += \
man/systemd.index.xml \
man/systemd.directives.xml
@@ -742,7 +737,12 @@ EXTRA_DIST += \
$(man_MANS) \
tools/make-man-index.py \
tools/make-directive-index.py \
- tools/xml_helper.py
+ tools/xml_helper.py \
+ man/systemd.index.xml \
+ man/index.html \
+ man/systemd.directives.xml \
+ man/glib-event-glue.c \
+ $(NULL)
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
@@ -785,6 +785,8 @@ libsystemd_shared_la_SOURCES = \
src/shared/time-util.h \
src/shared/locale-util.c \
src/shared/locale-util.h \
+ src/shared/signal-util.c \
+ src/shared/signal-util.h \
src/shared/mempool.c \
src/shared/mempool.h \
src/shared/hashmap.c \
@@ -1451,6 +1453,7 @@ tests += \
test-socket-util \
test-fdset \
test-conf-files \
+ test-conf-parser \
test-capability \
test-async \
test-ratelimit \
@@ -2078,6 +2081,12 @@ test_conf_files_LDADD = \
libsystemd-label.la \
libsystemd-shared.la
+test_conf_parser_SOURCES = \
+ src/test/test-conf-parser.c
+
+test_conf_parser_LDADD = \
+ libsystemd-shared.la
+
test_bus_policy_SOURCES = \
src/bus-proxyd/test-bus-xml-policy.c
@@ -2131,7 +2140,7 @@ systemd_analyze_SOURCES = \
src/analyze/analyze-verify.c \
src/analyze/analyze-verify.h
-systemd_verify_CFLAGS = \
+systemd_analyze_CFLAGS = \
$(AM_CFLAGS) \
$(SECCOMP_CFLAGS)
@@ -2311,15 +2320,15 @@ nodist_sysusers_DATA = \
sysusers.d/systemd.conf \
sysusers.d/basic.conf
+INSTALL_DIRS += \
+ $(sysusersdir)
+endif
+
EXTRA_DIST += \
units/systemd-sysusers.service.in \
sysusers.d/systemd.conf.m4 \
sysusers.d/basic.conf.in
-INSTALL_DIRS += \
- $(sysusersdir)
-endif
-
# ------------------------------------------------------------------------------
dist_factory_etc_DATA = \
factory/etc/nsswitch.conf
@@ -2348,13 +2357,13 @@ rootbin_PROGRAMS += \
nodist_systemunit_DATA += \
units/systemd-firstboot.service
-EXTRA_DIST += \
- units/systemd-firstboot.service.in
-
SYSINIT_TARGET_WANTS += \
systemd-firstboot.service
endif
+EXTRA_DIST += \
+ units/systemd-firstboot.service.in
+
# ------------------------------------------------------------------------------
systemd_machine_id_setup_SOURCES = \
src/machine-id-setup/machine-id-setup-main.c \
@@ -2485,11 +2494,6 @@ systemd_hibernate_resume_generator_LDADD = \
libsystemd-label.la \
libsystemd-shared.la
-EXTRA_DIST += \
- units/systemd-hibernate.service.in \
- units/systemd-hibernate-resume@.service.in \
- units/systemd-hybrid-sleep.service.in
-
dist_systemunit_DATA += \
units/hibernate.target \
units/hybrid-sleep.target
@@ -2500,6 +2504,11 @@ nodist_systemunit_DATA += \
units/systemd-hybrid-sleep.service
endif
+EXTRA_DIST += \
+ units/systemd-hibernate.service.in \
+ units/systemd-hibernate-resume@.service.in \
+ units/systemd-hybrid-sleep.service.in
+
# ------------------------------------------------------------------------------
if ENABLE_EFI
systemgenerator_PROGRAMS += \
@@ -2685,7 +2694,6 @@ $(stub): $(stub_solib)
# ------------------------------------------------------------------------------
CLEANFILES += test-efi-disk.img
-EXTRA_DIST += test/test-efi-create-disk.sh
test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
$(AM_V_GEN)test/test-efi-create-disk.sh
@@ -2695,6 +2703,8 @@ test-efi: test-efi-disk.img
endif
endif
+EXTRA_DIST += test/test-efi-create-disk.sh
+
# ------------------------------------------------------------------------------
if HAVE_BLKID
systemgenerator_PROGRAMS += \
@@ -3940,11 +3950,6 @@ dist_udevhwdb_DATA = \
hwdb/70-pointingstick.hwdb \
hwdb/70-touchpad.hwdb
-EXTRA_DIST += \
- units/systemd-hwdb-update.service.in \
- hwdb/ids-update.pl \
- hwdb/sdio.ids
-
SYSINIT_TARGET_WANTS += \
systemd-hwdb-update.service
@@ -3960,6 +3965,11 @@ hwdb-remove-hook:
-test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
endif
+EXTRA_DIST += \
+ units/systemd-hwdb-update.service.in \
+ hwdb/ids-update.pl \
+ hwdb/sdio.ids
+
# ------------------------------------------------------------------------------
TESTS += \
test/udev-test.pl \
@@ -4357,9 +4367,6 @@ dist_systemunit_DATA += \
nodist_systemunit_DATA += \
units/systemd-journal-remote.service
-EXTRA_DIST += \
- units/systemd-journal-remote.service.in
-
journal-remote-install-hook: journal-install-hook
-$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
-chown 0:0 $(DESTDIR)/var/log/journal/remote
@@ -4373,6 +4380,7 @@ nodist_pkgsysconf_DATA += \
src/journal-remote/journal-remote.conf
EXTRA_DIST += \
+ units/systemd-journal-remote.service.in \
src/journal-remote/journal-remote.conf.in
endif
@@ -4399,15 +4407,14 @@ systemd_journal_upload_LDADD = \
nodist_systemunit_DATA += \
units/systemd-journal-upload.service
-EXTRA_DIST += \
- units/systemd-journal-upload.service.in
-
nodist_pkgsysconf_DATA += \
src/journal-remote/journal-upload.conf
+endif
+
EXTRA_DIST += \
+ units/systemd-journal-upload.service.in \
src/journal-remote/journal-upload.conf.in
-endif
# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
journalctl_CFLAGS = \
@@ -4955,10 +4962,10 @@ dist_pkgsysconf_DATA += \
nodist_systemunit_DATA += \
units/systemd-bootchart.service
+endif
EXTRA_DIST += \
units/systemd-bootchart.service.in
-endif
# ------------------------------------------------------------------------------
if ENABLE_QUOTACHECK
@@ -5427,9 +5434,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.machine1.busname
-EXTRA_DIST += \
- units/systemd-machined.service.in
-
libnss_mymachines_la_SOURCES = \
src/nss-mymachines/nss-mymachines.sym \
src/nss-mymachines/nss-mymachines.c
@@ -5452,6 +5456,9 @@ lib_LTLIBRARIES += \
endif
+EXTRA_DIST += \
+ units/systemd-machined.service.in
+
# ------------------------------------------------------------------------------
if ENABLE_IMPORTD
@@ -5579,9 +5586,6 @@ dist_rootlibexec_DATA = \
nodist_systemunit_DATA += \
units/systemd-importd.service
-EXTRA_DIST += \
- units/systemd-importd.service.in
-
dist_systemunit_DATA_busnames += \
units/org.freedesktop.import1.busname
@@ -5629,6 +5633,11 @@ endif
endif
+EXTRA_DIST += \
+ units/systemd-importd.service.in \
+ src/resolve/resolved.conf.in
+
+
# ------------------------------------------------------------------------------
if ENABLE_RESOLVED
systemd_resolved_SOURCES = \
@@ -5702,9 +5711,6 @@ dist_dbuspolicy_DATA += \
dist_dbussystemservice_DATA += \
src/resolve/org.freedesktop.resolve1.service
-EXTRA_DIST += \
- units/systemd-resolved.service.m4.in
-
SYSTEM_UNIT_ALIASES += \
systemd-resolved.service dbus-org.freedesktop.resolve1.service
@@ -5717,9 +5723,6 @@ GENERAL_ALIASES += \
nodist_pkgsysconf_DATA += \
src/resolve/resolved.conf
-EXTRA_DIST += \
- src/resolve/resolved.conf.in
-
tests += \
test-dns-domain
@@ -5784,6 +5787,9 @@ rootlibexec_PROGRAMS += \
endif
+EXTRA_DIST += \
+ units/systemd-resolved.service.m4.in
+
# ------------------------------------------------------------------------------
if ENABLE_NETWORKD
rootlibexec_PROGRAMS += \
@@ -5947,13 +5953,12 @@ BUSNAMES_TARGET_WANTS += \
gperf_gperf_sources += \
src/network/networkd-network-gperf.gperf \
src/network/networkd-netdev-gperf.gperf
+endif
EXTRA_DIST += \
units/systemd-networkd.service.m4.in \
units/systemd-networkd-wait-online.service.in
-endif
-
# ------------------------------------------------------------------------------
if ENABLE_LOGIND
systemd_logind_SOURCES = \
@@ -6178,14 +6183,14 @@ rootlibexec_PROGRAMS += \
nodist_systemunit_DATA += \
units/systemd-user-sessions.service
-EXTRA_DIST += \
- units/systemd-user-sessions.service.in
-
MULTI_USER_TARGET_WANTS += \
systemd-user-sessions.service
endif
+EXTRA_DIST += \
+ units/systemd-user-sessions.service.in
+
# ------------------------------------------------------------------------------
if HAVE_PYTHON_DEVEL
@@ -6347,9 +6352,6 @@ clean-python:
# ------------------------------------------------------------------------------
if ENABLE_COMPAT_LIBS
-EXTRA_DIST += \
- src/compat-libs/linkwarning.h
-
libsystemd-%.c: src/compat-libs/libsystemd-%.sym
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
@@ -6459,6 +6461,7 @@ UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
endif
EXTRA_DIST += \
+ src/compat-libs/linkwarning.h \
src/compat-libs/libsystemd-journal.pc.in \
src/compat-libs/libsystemd-login.pc.in \
src/compat-libs/libsystemd-id128.pc.in \
@@ -6505,6 +6508,8 @@ substitutions = \
'|DEBUGTTY=$(DEBUGTTY)|' \
'|KILL=$(KILL)|' \
'|KMOD=$(KMOD)|' \
+ '|MOUNT_PATH=$(MOUNT_PATH)|' \
+ '|UMOUNT_PATH=$(UMOUNT_PATH)|' \
'|MKDIR_P=$(MKDIR_P)|' \
'|QUOTAON=$(QUOTAON)|' \
'|QUOTACHECK=$(QUOTACHECK)|' \
@@ -6605,7 +6610,7 @@ man/custom-entities.ent: configure.ac
printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
> $@ # '
-DISTCLEANFILES += \
+CLEANFILES += \
man/custom-entities.ent
XSLTPROC_FLAGS = \
@@ -6803,7 +6808,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-pamlibdir=$$dc_install_base/$(pamlibdir) \
--with-pamconfdir=$$dc_install_base/$(pamconfdir) \
--with-rootprefix=$$dc_install_base \
- --disable-split-usr \
--enable-kdbus \
--enable-compat-libs
@@ -6827,6 +6831,14 @@ DISTCHECK_CONFIGURE_FLAGS += \
--enable-gtk-doc
endif
+if ENABLE_SPLIT_USR
+DISTCHECK_CONFIGURE_FLAGS += \
+ --enable-split-usr
+else
+DISTCHECK_CONFIGURE_FLAGS += \
+ --disable-split-usr
+endif
+
#
# Require python when making dist
#
diff --git a/NEWS b/NEWS
index f72f502129..2e2d1cefeb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,16 @@
systemd System and Service Manager
+CHANGES WITH 221:
+
+ * Support for chkconfig (--enable-chkconfig) was removed in favour of
+ calling an abstraction /lib/systemd/systemd-sysv-install. This needs
+ to be implemented for your distribution. See "SYSV INIT.D SCRIPTS" in
+ README for details.
+
+ Contributions from: ...
+
+ -- Berlin, UNRELEASED
+
CHANGES WITH 220:
* The gudev library has been extracted into a separate repository
@@ -3997,7 +4008,7 @@ CHANGES WITH 191:
* HandleSleepKey= in logind.conf has been split up into
HandleSuspendKey= and HandleHibernateKey=. The old setting
is not available anymore. X11 and the kernel are
- distuingishing between these keys and we should too. This
+ distinguishing between these keys and we should too. This
also means the inhibition lock for these keys has been split
into two.
@@ -4743,7 +4754,7 @@ CHANGES WITH 43:
* Various functionality updates to libsystemd-login.so
- * Track class of PAM logins to distuingish greeters from
+ * Track class of PAM logins to distinguish greeters from
normal user logins.
Contributions from: Kay Sievers, Lennart Poettering, Michael
diff --git a/README b/README
index 2b8c68e340..8abd862fe1 100644
--- a/README
+++ b/README
@@ -222,6 +222,17 @@ NSS:
hosts: files mymachines resolve myhostname
+SYSV INIT.D SCRIPTS:
+ When calling "systemctl enable/disable/is-enabled" on a unit which is a
+ SysV init.d script, it calls /usr/lib/systemd/systemd-sysv-install;
+ this needs to translate the action into the distribution specific
+ mechanism such as chkconfig or update-rc.d. Packagers need to provide
+ this script if you need this functionality (you don't if you disabled
+ SysV init support).
+
+ Please see src/systemctl/systemd-sysv-install.SKELETON for how this
+ needs to look like, and provide an implementation at the marked places.
+
WARNINGS:
systemd will warn you during boot if /etc/mtab is not a
symlink to /proc/mounts. Please ensure that /etc/mtab is a
@@ -239,7 +250,7 @@ WARNINGS:
supported anymore by the basic set of Linux OS components.
systemd requires that the /run mount point exists. systemd also
- requires that /var/run is a a symlink to /run.
+ requires that /var/run is a symlink to /run.
For more information on this issue consult
http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
diff --git a/configure.ac b/configure.ac
index 0818dd80cf..78d52e401c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -491,25 +491,6 @@ if test "x${have_ima}" != xno ; then
fi
# ------------------------------------------------------------------------------
-have_chkconfig=yes
-AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
- [case "${enableval}" in
- yes) have_chkconfig=yes ;;
- no) have_chkconfig=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
- esac],
- [AC_PATH_PROG(CHKCONFIG, chkconfig)
- if test -z "$CHKCONFIG"; then
- have_chkconfig=no
- else
- have_chkconfig=yes
- fi])
-
-if test "x${have_chkconfig}" != xno ; then
- AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
-fi
-
-# ------------------------------------------------------------------------------
have_selinux=no
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
if test "x$enable_selinux" != "xno"; then
@@ -1389,16 +1370,19 @@ AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
+AX_NORMALIZE_PATH([with_dbuspolicydir])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
[with_dbussessionservicedir=${datadir}/dbus-1/services])
+AX_NORMALIZE_PATH([with_dbussessionservicedir])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
+AX_NORMALIZE_PATH([with_dbussystemservicedir])
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
@@ -1408,29 +1392,35 @@ AC_ARG_WITH([bashcompletiondir],
] , [
with_bashcompletiondir=${datadir}/bash-completion/completions
])])
+AX_NORMALIZE_PATH([with_bashcompletiondir])
AC_ARG_WITH([zshcompletiondir],
AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
+AX_NORMALIZE_PATH([with_zshcompletiondir])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[], [with_rootprefix=${ac_default_prefix}])
+AX_NORMALIZE_PATH([with_rootprefix])
AC_ARG_WITH([rootlibdir],
AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
[],
[with_rootlibdir=${libdir}])
+AX_NORMALIZE_PATH([with_rootlibdir])
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
[with_pamlibdir=${with_rootlibdir}/security])
+AX_NORMALIZE_PATH([with_pamlibdir])
AC_ARG_WITH([pamconfdir],
AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
[],
[with_pamconfdir=${sysconfdir}/pam.d])
+AX_NORMALIZE_PATH([with_pamconfdir])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
@@ -1452,6 +1442,7 @@ AC_SUBST(DEFAULT_DKR_INDEX_URL)
AS_IF([test "x${enable_split_usr}" = "xyes"], [
AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
])
+AM_CONDITIONAL(ENABLE_SPLIT_USR, [test "x${enable_split_usr}" = "xyes"])
# Work around intltoolize and gtk-doc problems in VPATH builds
AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
@@ -1541,7 +1532,6 @@ AC_MSG_RESULT([
GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode}
MICROHTTPD: ${have_microhttpd}
- CHKCONFIG: ${have_chkconfig}
GNUTLS: ${have_gnutls}
libcurl: ${have_libcurl}
libidn: ${have_libidn}
diff --git a/m4/ax_normalize_path.m4 b/m4/ax_normalize_path.m4
new file mode 100644
index 0000000000..e8f9973e35
--- /dev/null
+++ b/m4/ax_normalize_path.m4
@@ -0,0 +1,115 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
+#
+# DESCRIPTION
+#
+# Perform some cleanups on the value of $VARNAME (interpreted as a path):
+#
+# - empty paths are changed to '.'
+# - trailing slashes are removed
+# - repeated slashes are squeezed except a leading doubled slash '//'
+# (which might indicate a networked disk on some OS).
+#
+# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
+# REFERENCE_STRING contains some backslashes, all slashes and backslashes
+# are turned into backslashes, otherwise they are all turned into slashes.
+#
+# This makes processing of DOS filenames quite easier, because you can
+# turn a filename to the Unix notation, make your processing, and turn it
+# back to original notation.
+#
+# filename='A:\FOO\\BAR\'
+# old_filename="$filename"
+# # Switch to the unix notation
+# AX_NORMALIZE_PATH([filename], ["/"])
+# # now we have $filename = 'A:/FOO/BAR' and we can process it as if
+# # it was a Unix path. For instance let's say that you want
+# # to append '/subpath':
+# filename="$filename/subpath"
+# # finally switch back to the original notation
+# AX_NORMALIZE_PATH([filename], ["$old_filename"])
+# # now $filename equals to 'A:\FOO\BAR\subpath'
+#
+# One good reason to make all path processing with the unix convention is
+# that backslashes have a special meaning in many cases. For instance
+#
+# expr 'A:\FOO' : 'A:\Foo'
+#
+# will return 0 because the second argument is a regex in which
+# backslashes have to be backslashed. In other words, to have the two
+# strings to match you should write this instead:
+#
+# expr 'A:\Foo' : 'A:\\Foo'
+#
+# Such behavior makes DOS filenames extremely unpleasant to work with. So
+# temporary turn your paths to the Unix notation, and revert them to the
+# original notation after the processing. See the macro
+# AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
+#
+# REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
+# converted to backslashes if $VARIABLE already contains some backslashes
+# (see $thirddir below).
+#
+# firstdir='/usr/local//share'
+# seconddir='C:\Program Files\\'
+# thirddir='C:\home/usr/'
+# AX_NORMALIZE_PATH([firstdir])
+# AX_NORMALIZE_PATH([seconddir])
+# AX_NORMALIZE_PATH([thirddir])
+# # $firstdir = '/usr/local/share'
+# # $seconddir = 'C:\Program Files'
+# # $thirddir = 'C:\home\usr'
+#
+# LICENSE
+#
+# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 5
+
+AU_ALIAS([ADL_NORMALIZE_PATH], [AX_NORMALIZE_PATH])
+AC_DEFUN([AX_NORMALIZE_PATH],
+[case ":[$]$1:" in
+# change empty paths to '.'
+ ::) $1='.' ;;
+# strip trailing slashes
+ :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
+ :*:) ;;
+esac
+# squeze repeated slashes
+case ifelse($2,,"[$]$1",$2) in
+# if the path contains any backslashes, turn slashes into backslashes
+ *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+# if the path contains slashes, also turn backslashes into slashes
+ *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
+esac])
diff --git a/man/binfmt.d.xml b/man/binfmt.d.xml
index 5b63cfb4c3..3aa5eb1859 100644
--- a/man/binfmt.d.xml
+++ b/man/binfmt.d.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml
index bf6ca0bf9e..b383f6e24d 100644
--- a/man/bootchart.conf.xml
+++ b/man/bootchart.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -52,17 +55,17 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/bootchart.conf</filename></para>
- <para><filename>/etc/systemd/bootchart.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/bootchart.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/bootchart.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/bootchart.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/bootchart.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/bootchart.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>When starting, systemd-bootchart will read the configuration
- file <filename>/etc/systemd/bootchart.conf</filename>, followed by
+ file <filename>&pkgsysconfdir;/bootchart.conf</filename>, followed by
the files in the <filename>bootchart.conf.d</filename>
directories. These configuration files determine logging
parameters and graph output.</para>
@@ -122,10 +125,10 @@
<term><varname>Init=[path]</varname></term>
<listitem><para>Configures bootchart to run a non-standard
binary instead of
- <filename>/usr/lib/systemd/systemd</filename>. This option is
+ <filename>&rootlibexecdir;/systemd</filename>. This option is
only relevant if bootchart was invoked from the kernel command
line with
- init=/usr/lib/systemd/systemd-bootchart.</para></listitem>
+ init=&rootlibexecdir;/systemd-bootchart.</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/man/bootctl.xml b/man/bootctl.xml
index 63ad9392eb..c7c65aa4b2 100644
--- a/man/bootctl.xml
+++ b/man/bootctl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/bootup.xml b/man/bootup.xml
index b92057af29..de34a59a72 100644
--- a/man/bootup.xml
+++ b/man/bootup.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/busctl.xml b/man/busctl.xml
index 807fc78e8f..08303b4dd8 100644
--- a/man/busctl.xml
+++ b/man/busctl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/coredump.conf.xml b/man/coredump.conf.xml
index fd54c59e6b..4c65c1cf03 100644
--- a/man/coredump.conf.xml
+++ b/man/coredump.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,10 +52,10 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/coredump.conf</filename></para>
- <para><filename>/etc/systemd/coredump.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/coredump.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/coredump.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/coredump.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/coredump.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/coredump.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/coredumpctl.xml b/man/coredumpctl.xml
index efbc655a76..4bd1a7e67f 100644
--- a/man/coredumpctl.xml
+++ b/man/coredumpctl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/crypttab.xml b/man/crypttab.xml
index d4ff760adc..d403e71bef 100644
--- a/man/crypttab.xml
+++ b/man/crypttab.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/daemon.xml b/man/daemon.xml
index a8bbfc055b..38d458e05d 100644
--- a/man/daemon.xml
+++ b/man/daemon.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/file-hierarchy.xml b/man/file-hierarchy.xml
index 3a5627d196..f73a3edc06 100644
--- a/man/file-hierarchy.xml
+++ b/man/file-hierarchy.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/halt.xml b/man/halt.xml
index a06dbd0097..f425ebdb8e 100644
--- a/man/halt.xml
+++ b/man/halt.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/hostname.xml b/man/hostname.xml
index 9688450e1c..34aaca1acd 100644
--- a/man/hostname.xml
+++ b/man/hostname.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
index b1f038156d..93934668cc 100644
--- a/man/hostnamectl.xml
+++ b/man/hostnamectl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/hwdb.xml b/man/hwdb.xml
index 509dab81c5..e6215df738 100644
--- a/man/hwdb.xml
+++ b/man/hwdb.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refentry id="hwdb" conditional="ENABLE_HWDB">
<refentryinfo>
@@ -40,17 +43,17 @@
<refsect1><title>Hardware Database Files</title>
<para>The hwdb files are read from the files located in the
- system hwdb directory <filename>/usr/lib/udev/hwdb.d</filename>,
+ system hwdb directory <filename>&udevlibexecdir;/hwdb.d</filename>,
the volatile runtime directory <filename>/run/udev/hwdb.d</filename>
and the local administration directory <filename>/etc/udev/hwdb.d</filename>.
All hwdb files are collectively sorted and processed in lexical order,
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <filename>/etc</filename>
have the highest priority, files in <filename>/run</filename> take precedence
- over files with the same name in <filename>/usr/lib</filename>. This can be
+ over files with the same name in <filename>&rootprefix;/lib</filename>. This can be
used to override a system-supplied hwdb file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a hwdb file in
- <filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
+ <filename>&rootprefix;/lib</filename>, pointing to <filename>/dev/null</filename>,
disables the hwdb file entirely. hwdb files must have the extension
<filename>.hwdb</filename>; other extensions are ignored.</para>
@@ -70,7 +73,7 @@
<para>The content of all hwdb files is read by
<citerefentry><refentrytitle>systemd-hwdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and compiled to a binary database located at <filename>/etc/udev/hwdb.bin</filename>,
- or alternatively <filename>/usr/lib/udev/hwdb.bin</filename> if you want ship the compiled
+ or alternatively <filename>&udevlibexecdir;/hwdb.bin</filename> if you want ship the compiled
database in an immutable image.
During runtime only the binary database is used.</para>
</refsect1>
diff --git a/man/journal-remote.conf.xml b/man/journal-remote.conf.xml
index a7b2227182..948dfa531d 100644
--- a/man/journal-remote.conf.xml
+++ b/man/journal-remote.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,10 +52,10 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/journal-remote.conf</filename></para>
- <para><filename>/etc/systemd/journald.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/journal-remote.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/journald.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/journald.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
@@ -83,7 +86,7 @@
<varlistentry>
<term><varname>ServerKeyFile=</varname></term>
- <listitem><para>SSL key in PEM format</para></listitem>
+ <listitem><para>SSL key in PEM format.</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/man/journalctl.xml b/man/journalctl.xml
index 08de0ff068..d67d9606be 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 2cbe58bc15..8d0dbb0133 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,10 +52,10 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/journald.conf</filename></para>
- <para><filename>/etc/systemd/journald.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/journald.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/journald.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/journald.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml
index eb73727027..6490123a53 100644
--- a/man/kernel-command-line.xml
+++ b/man/kernel-command-line.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/kernel-install.xml b/man/kernel-install.xml
index d7e27de758..8891bae71e 100644
--- a/man/kernel-install.xml
+++ b/man/kernel-install.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/less-variables.xml b/man/less-variables.xml
index 0fb4d7fbcf..e344c62e1a 100644
--- a/man/less-variables.xml
+++ b/man/less-variables.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refsect1>
<title>Environment</title>
diff --git a/man/libsystemd-pkgconfig.xml b/man/libsystemd-pkgconfig.xml
index 272da64cd7..3620f47316 100644
--- a/man/libsystemd-pkgconfig.xml
+++ b/man/libsystemd-pkgconfig.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refsect1>
<title>Notes</title>
diff --git a/man/locale.conf.xml b/man/locale.conf.xml
index 2c32d16094..8af49af7f2 100644
--- a/man/locale.conf.xml
+++ b/man/locale.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/localectl.xml b/man/localectl.xml
index 7def047f62..caf963ae5e 100644
--- a/man/localectl.xml
+++ b/man/localectl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/localtime.xml b/man/localtime.xml
index 2827da6e93..1740dde9eb 100644
--- a/man/localtime.xml
+++ b/man/localtime.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/loginctl.xml b/man/loginctl.xml
index 9dda14d454..d0529c160e 100644
--- a/man/loginctl.xml
+++ b/man/loginctl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/logind.conf.xml b/man/logind.conf.xml
index 2b79547275..96ebd6eed0 100644
--- a/man/logind.conf.xml
+++ b/man/logind.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,10 +52,10 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/logind.conf</filename></para>
- <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/logind.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/logind.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/logind.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/machine-id.xml b/man/machine-id.xml
index 92d67a3869..bb7cd7f060 100644
--- a/man/machine-id.xml
+++ b/man/machine-id.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/machine-info.xml b/man/machine-info.xml
index 916f1dab66..a6db1e0317 100644
--- a/man/machine-info.xml
+++ b/man/machine-info.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/machinectl.xml b/man/machinectl.xml
index 50cbb1bc98..18ef6a5780 100644
--- a/man/machinectl.xml
+++ b/man/machinectl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -585,8 +588,8 @@
first verified with detached GPG signature file
<filename>SHA256SUMS.gpg</filename>. The public key for this
verification step needs to be available in
- <filename>/usr/lib/systemd/import-pubring.gpg</filename> or
- <filename>/etc/systemd/import-pubring.gpg</filename>.</para>
+ <filename>&rootlibexecdir;/import-pubring.gpg</filename> or
+ <filename>&pkgsysconfdir;/import-pubring.gpg</filename>.</para>
<para>The container image will be downloaded and stored in a
read-only subvolume in
diff --git a/man/modules-load.d.xml b/man/modules-load.d.xml
index 4b722aa128..82a98be666 100644
--- a/man/modules-load.d.xml
+++ b/man/modules-load.d.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/networkctl.xml b/man/networkctl.xml
index d11d60f2a9..402698cb12 100644
--- a/man/networkctl.xml
+++ b/man/networkctl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/nss-myhostname.xml b/man/nss-myhostname.xml
index 2d36df6f6f..7379213f81 100644
--- a/man/nss-myhostname.xml
+++ b/man/nss-myhostname.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/nss-mymachines.xml b/man/nss-mymachines.xml
index eb1ed2592b..a3e6c75d1b 100644
--- a/man/nss-mymachines.xml
+++ b/man/nss-mymachines.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/os-release.xml b/man/os-release.xml
index 4ca2e59706..6ce5885812 100644
--- a/man/os-release.xml
+++ b/man/os-release.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml
index b4a3f502b4..6fdbcf91e0 100644
--- a/man/pam_systemd.xml
+++ b/man/pam_systemd.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/resolved.conf.xml b/man/resolved.conf.xml
index 8047a4ea75..52329eba56 100644
--- a/man/resolved.conf.xml
+++ b/man/resolved.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,10 +52,10 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/resolved.conf</filename></para>
- <para><filename>/etc/systemd/resolved.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/resolved.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/resolved.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/resolved.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/resolved.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/resolved.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/runlevel.xml b/man/runlevel.xml
index fc1f523855..f34f9583e8 100644
--- a/man/runlevel.xml
+++ b/man/runlevel.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml
index b7ba363656..686ba0cefe 100644
--- a/man/sd-daemon.xml
+++ b/man/sd-daemon.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd-id128.xml b/man/sd-id128.xml
index ea7972055d..067d43b432 100644
--- a/man/sd-id128.xml
+++ b/man/sd-id128.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd-journal.xml b/man/sd-journal.xml
index 9b1a52207f..165284c0ae 100644
--- a/man/sd-journal.xml
+++ b/man/sd-journal.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd-login.xml b/man/sd-login.xml
index 328f71164d..4c4e5f0077 100644
--- a/man/sd-login.xml
+++ b/man/sd-login.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_booted.xml b/man/sd_booted.xml
index 4dd674b8ea..235e78d083 100644
--- a/man/sd_booted.xml
+++ b/man/sd_booted.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_creds_get_pid.xml b/man/sd_bus_creds_get_pid.xml
index 4debee6124..54714dea1d 100644
--- a/man/sd_bus_creds_get_pid.xml
+++ b/man/sd_bus_creds_get_pid.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_creds_new_from_pid.xml b/man/sd_bus_creds_new_from_pid.xml
index 518a95abd0..695d4e1f5a 100644
--- a/man/sd_bus_creds_new_from_pid.xml
+++ b/man/sd_bus_creds_new_from_pid.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_default.xml b/man/sd_bus_default.xml
index 9db264ce59..55f1b8bb69 100644
--- a/man/sd_bus_default.xml
+++ b/man/sd_bus_default.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_error.xml b/man/sd_bus_error.xml
index dc5a93d617..bd2a27984c 100644
--- a/man/sd_bus_error.xml
+++ b/man/sd_bus_error.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_message_append.xml b/man/sd_bus_message_append.xml
index c3bffbdfd9..91a80792e1 100644
--- a/man/sd_bus_message_append.xml
+++ b/man/sd_bus_message_append.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_message_append_array.xml b/man/sd_bus_message_append_array.xml
index 9490689e06..5409893374 100644
--- a/man/sd_bus_message_append_array.xml
+++ b/man/sd_bus_message_append_array.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_message_append_basic.xml b/man/sd_bus_message_append_basic.xml
index 344b7791fa..81ac6de952 100644
--- a/man/sd_bus_message_append_basic.xml
+++ b/man/sd_bus_message_append_basic.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_message_append_string_memfd.xml b/man/sd_bus_message_append_string_memfd.xml
index ea3b7d3b75..1fecbd5773 100644
--- a/man/sd_bus_message_append_string_memfd.xml
+++ b/man/sd_bus_message_append_string_memfd.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_message_append_strv.xml b/man/sd_bus_message_append_strv.xml
index b91406f275..d986b06a41 100644
--- a/man/sd_bus_message_append_strv.xml
+++ b/man/sd_bus_message_append_strv.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_message_get_cookie.xml b/man/sd_bus_message_get_cookie.xml
index 02374d7508..7795acfec3 100644
--- a/man/sd_bus_message_get_cookie.xml
+++ b/man/sd_bus_message_get_cookie.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_message_get_monotonic_usec.xml b/man/sd_bus_message_get_monotonic_usec.xml
index d74aaad7dd..c109fe10a3 100644
--- a/man/sd_bus_message_get_monotonic_usec.xml
+++ b/man/sd_bus_message_get_monotonic_usec.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_negotiate_fds.xml b/man/sd_bus_negotiate_fds.xml
index 26a599e7d3..4f9204e7bc 100644
--- a/man/sd_bus_negotiate_fds.xml
+++ b/man/sd_bus_negotiate_fds.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_new.xml b/man/sd_bus_new.xml
index 91ca8161dc..bc91dd2665 100644
--- a/man/sd_bus_new.xml
+++ b/man/sd_bus_new.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_path_encode.xml b/man/sd_bus_path_encode.xml
index 69cda53bf4..0a6ac80473 100644
--- a/man/sd_bus_path_encode.xml
+++ b/man/sd_bus_path_encode.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_bus_request_name.xml b/man/sd_bus_request_name.xml
index 6aa132bb26..78b440b7db 100644
--- a/man/sd_bus_request_name.xml
+++ b/man/sd_bus_request_name.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_add_child.xml b/man/sd_event_add_child.xml
index 640d4b12d0..7de9f409e9 100644
--- a/man/sd_event_add_child.xml
+++ b/man/sd_event_add_child.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_add_defer.xml b/man/sd_event_add_defer.xml
index dd5d19b519..4aabc0793a 100644
--- a/man/sd_event_add_defer.xml
+++ b/man/sd_event_add_defer.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_add_signal.xml b/man/sd_event_add_signal.xml
index ca9c4b94fd..e84d5c7200 100644
--- a/man/sd_event_add_signal.xml
+++ b/man/sd_event_add_signal.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_add_time.xml b/man/sd_event_add_time.xml
index 5692ee6008..3c5de48cab 100644
--- a/man/sd_event_add_time.xml
+++ b/man/sd_event_add_time.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_get_fd.xml b/man/sd_event_get_fd.xml
index 332e729ee8..8f74c1e5c4 100644
--- a/man/sd_event_get_fd.xml
+++ b/man/sd_event_get_fd.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_new.xml b/man/sd_event_new.xml
index 854a887bce..d225330023 100644
--- a/man/sd_event_new.xml
+++ b/man/sd_event_new.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_run.xml b/man/sd_event_run.xml
index ac78d358b6..036887d9f0 100644
--- a/man/sd_event_run.xml
+++ b/man/sd_event_run.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_set_name.xml b/man/sd_event_set_name.xml
index 3584b225d1..0b46414bba 100644
--- a/man/sd_event_set_name.xml
+++ b/man/sd_event_set_name.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_event_wait.xml b/man/sd_event_wait.xml
index 835cc5deb3..db74a96e8e 100644
--- a/man/sd_event_wait.xml
+++ b/man/sd_event_wait.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml
index 4390d36ebe..3f2c666c61 100644
--- a/man/sd_get_seats.xml
+++ b/man/sd_get_seats.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml
index 2ad1f8f728..02fa2da283 100644
--- a/man/sd_id128_get_machine.xml
+++ b/man/sd_id128_get_machine.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_id128_randomize.xml b/man/sd_id128_randomize.xml
index ab449d2937..c4d7c42106 100644
--- a/man/sd_id128_randomize.xml
+++ b/man/sd_id128_randomize.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_id128_to_string.xml b/man/sd_id128_to_string.xml
index e70c80892e..988a646d84 100644
--- a/man/sd_id128_to_string.xml
+++ b/man/sd_id128_to_string.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml
index 627cb87aaf..57dd6afc89 100644
--- a/man/sd_is_fifo.xml
+++ b/man/sd_is_fifo.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_add_match.xml b/man/sd_journal_add_match.xml
index 420f56356a..fe89cbf75c 100644
--- a/man/sd_journal_add_match.xml
+++ b/man/sd_journal_add_match.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_get_catalog.xml b/man/sd_journal_get_catalog.xml
index c19eb11b20..2ff3fc2826 100644
--- a/man/sd_journal_get_catalog.xml
+++ b/man/sd_journal_get_catalog.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_get_cursor.xml b/man/sd_journal_get_cursor.xml
index a400d8b1b5..1d38bac7fb 100644
--- a/man/sd_journal_get_cursor.xml
+++ b/man/sd_journal_get_cursor.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_get_cutoff_realtime_usec.xml b/man/sd_journal_get_cutoff_realtime_usec.xml
index 23e7cc65e8..ae5e638d70 100644
--- a/man/sd_journal_get_cutoff_realtime_usec.xml
+++ b/man/sd_journal_get_cutoff_realtime_usec.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_get_data.xml b/man/sd_journal_get_data.xml
index 1afbd7371c..b395fe01c9 100644
--- a/man/sd_journal_get_data.xml
+++ b/man/sd_journal_get_data.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml
index 3a38f733ab..51dcb1aeeb 100644
--- a/man/sd_journal_get_fd.xml
+++ b/man/sd_journal_get_fd.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_get_realtime_usec.xml b/man/sd_journal_get_realtime_usec.xml
index 607d74666b..921aa77ab6 100644
--- a/man/sd_journal_get_realtime_usec.xml
+++ b/man/sd_journal_get_realtime_usec.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_get_usage.xml b/man/sd_journal_get_usage.xml
index 72c804d834..a89b77907c 100644
--- a/man/sd_journal_get_usage.xml
+++ b/man/sd_journal_get_usage.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_next.xml b/man/sd_journal_next.xml
index 115fe26661..216d9a59c6 100644
--- a/man/sd_journal_next.xml
+++ b/man/sd_journal_next.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_open.xml b/man/sd_journal_open.xml
index fb572802a3..f6aac75546 100644
--- a/man/sd_journal_open.xml
+++ b/man/sd_journal_open.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_print.xml b/man/sd_journal_print.xml
index 0cd0b45b9a..6dbf73f9c1 100644
--- a/man/sd_journal_print.xml
+++ b/man/sd_journal_print.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_query_unique.xml b/man/sd_journal_query_unique.xml
index ac0e5f633f..5c92f8972e 100644
--- a/man/sd_journal_query_unique.xml
+++ b/man/sd_journal_query_unique.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_seek_head.xml b/man/sd_journal_seek_head.xml
index d74c2d5bbc..d4c13c21f8 100644
--- a/man/sd_journal_seek_head.xml
+++ b/man/sd_journal_seek_head.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_journal_stream_fd.xml b/man/sd_journal_stream_fd.xml
index 2ea7731b48..ae7990e212 100644
--- a/man/sd_journal_stream_fd.xml
+++ b/man/sd_journal_stream_fd.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml
index 9b9705eb2e..38e159bb42 100644
--- a/man/sd_listen_fds.xml
+++ b/man/sd_listen_fds.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml
index a7b47a3207..ef97dae1d0 100644
--- a/man/sd_login_monitor_new.xml
+++ b/man/sd_login_monitor_new.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_machine_get_class.xml b/man/sd_machine_get_class.xml
index 5b881ccea1..68babd1981 100644
--- a/man/sd_machine_get_class.xml
+++ b/man/sd_machine_get_class.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_notify.xml b/man/sd_notify.xml
index 87e59c9cc2..d563bcf2aa 100644
--- a/man/sd_notify.xml
+++ b/man/sd_notify.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml
index b46d47101b..05a396157a 100644
--- a/man/sd_pid_get_session.xml
+++ b/man/sd_pid_get_session.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml
index 3c57ec9ea4..74b4ed5fc1 100644
--- a/man/sd_seat_get_active.xml
+++ b/man/sd_seat_get_active.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml
index 4ca3a6c150..e3af2b39c9 100644
--- a/man/sd_session_is_active.xml
+++ b/man/sd_session_is_active.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml
index b158f3528c..18a3427026 100644
--- a/man/sd_uid_get_state.xml
+++ b/man/sd_uid_get_state.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/sd_watchdog_enabled.xml b/man/sd_watchdog_enabled.xml
index 991431f33b..41850106e6 100644
--- a/man/sd_watchdog_enabled.xml
+++ b/man/sd_watchdog_enabled.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/shutdown.xml b/man/shutdown.xml
index a8af387c67..9bf599b372 100644
--- a/man/shutdown.xml
+++ b/man/shutdown.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/standard-conf.xml b/man/standard-conf.xml
index 004f53f70c..123877a0a5 100644
--- a/man/standard-conf.xml
+++ b/man/standard-conf.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refsection PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refsection>
<refsection id='confd'>
@@ -39,14 +42,14 @@
<para>Default configuration is defined during compilation, so a
configuration file is only needed when it is necessary to deviate
from those defaults. By default the configuration file in
- <filename>/etc/systemd/</filename> contains commented out entries
+ <filename>&pkgsysconfdir;/</filename> contains commented out entries
showing the defaults as a guide to the administrator. This file
can be edited to create local overrides.
</para>
<para>When packages need to customize the configuration, they can
install configuration snippets in
- <filename>/usr/lib/systemd/*.conf.d/</filename>. Files in
+ <filename>&rootlibexecdir;/*.conf.d/</filename>. Files in
<filename>/etc/</filename> are reserved for the local
administrator, who may use this logic to override the
configuration files installed by vendor packages. The main
diff --git a/man/standard-options.xml b/man/standard-options.xml
index f214463392..5adda7c670 100644
--- a/man/standard-options.xml
+++ b/man/standard-options.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<variablelist>
<varlistentry id='help'>
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
index 8a131791a5..841cedba3a 100644
--- a/man/sysctl.d.xml
+++ b/man/sysctl.d.xml
@@ -1,5 +1,8 @@
<?xml version="1.0"?> <!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -127,7 +130,7 @@
<para><filename>/etc/udev/rules.d/99-bridge.rules</filename>:
</para>
- <programlisting>ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/bridge"
+ <programlisting>ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="&rootlibexecdir;/systemd-sysctl --prefix=/net/bridge"
</programlisting>
<para><filename>/etc/sysctl.d/bridge.conf</filename>:
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 94a77bce0c..35f47de52c 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -410,8 +413,8 @@
processes. Not all unit types manage processes of these
types however. For example, for mount units, control processes
are defined (which are the invocations of
- <filename>/usr/bin/mount</filename> and
- <filename>/usr/bin/umount</filename>), but no main process
+ <filename>&MOUNT_PATH;</filename> and
+ <filename>&UMOUNT_PATH;</filename>), but no main process
is defined. If omitted, defaults to
<option>all</option>.</para>
</listitem>
diff --git a/man/systemd-activate.xml b/man/systemd-activate.xml
index 3b854fd8ec..3aecc40b60 100644
--- a/man/systemd-activate.xml
+++ b/man/systemd-activate.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>/usr/lib/systemd/systemd-activate</command>
+ <command>&rootlibexecdir;/systemd-activate</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain"><replaceable>daemon</replaceable></arg>
<arg choice="opt" rep="repeat">OPTIONS</arg>
@@ -149,13 +152,13 @@
<example>
<title>Run an echo server on port 2000</title>
- <programlisting>$ /usr/lib/systemd/systemd-activate -l 2000 -a cat</programlisting>
+ <programlisting>$ &rootlibexecdir;/systemd-activate -l 2000 -a cat</programlisting>
</example>
<example>
<title>Run a socket activated instance of <citerefentry><refentrytitle>systemd-journal-gatewayd</refentrytitle><manvolnum>8</manvolnum></citerefentry></title>
- <programlisting>$ /usr/lib/systemd/systemd-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd</programlisting>
+ <programlisting>$ &rootlibexecdir;/systemd-activate -l 19531 &rootlibexecdir;/systemd-journal-gatewayd</programlisting>
</example>
</refsect1>
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml
index 198315052f..3509d155d3 100644
--- a/man/systemd-analyze.xml
+++ b/man/systemd-analyze.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-ask-password-console.service.xml b/man/systemd-ask-password-console.service.xml
index 479e5f2e5b..488a8793dd 100644
--- a/man/systemd-ask-password-console.service.xml
+++ b/man/systemd-ask-password-console.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-ask-password.xml b/man/systemd-ask-password.xml
index 877c71af53..2402103719 100644
--- a/man/systemd-ask-password.xml
+++ b/man/systemd-ask-password.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-backlight@.service.xml b/man/systemd-backlight@.service.xml
index a259f5d583..123576255d 100644
--- a/man/systemd-backlight@.service.xml
+++ b/man/systemd-backlight@.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-backlight@.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-backlight</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-backlight</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-binfmt.service.xml b/man/systemd-binfmt.service.xml
index 66d264389e..8659e63ebc 100644
--- a/man/systemd-binfmt.service.xml
+++ b/man/systemd-binfmt.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-binfmt.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-binfmt</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-binfmt</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index 538666760a..ea8a783601 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -60,7 +63,7 @@
usage, as well as per-process information from a running system.
Collected results are output as an SVG graph. Normally,
systemd-bootchart is invoked by the kernel by passing
- <option>init=<filename>/usr/lib/systemd/systemd-bootchart</filename></option>
+ <option>init=<filename>&rootlibexecdir;/systemd-bootchart</filename></option>
on the kernel command line. systemd-bootchart will then fork the
real init off to resume normal system startup, while monitoring
and logging startup information in the background.
@@ -106,7 +109,7 @@
<listitem><para>The kernel can invoke
<command>systemd-bootchart</command> instead of the init
process. In turn, <command>systemd-bootchart</command> will
- invoke <command>/usr/lib/systemd/systemd</command>.
+ invoke <command>&rootlibexecdir;/systemd</command>.
</para></listitem>
</varlistentry>
@@ -128,7 +131,7 @@
<title>Options</title>
<para>These options can also be set in the
- <filename>/etc/systemd/bootchart.conf</filename> file. See
+ <filename>&pkgsysconfdir;/bootchart.conf</filename> file. See
<citerefentry project='man-pages'><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
@@ -201,7 +204,7 @@
<term><option>-i</option></term>
<term><option>--init <replaceable>path</replaceable></option></term>
<listitem><para>Use this init binary. Defaults to
- <command>/usr/lib/systemd/systemd</command>.
+ <command>&rootlibexecdir;/systemd</command>.
</para></listitem>
</varlistentry>
diff --git a/man/systemd-bus-proxyd.xml b/man/systemd-bus-proxyd.xml
index a1e8f4fb64..bbcf3d0981 100644
--- a/man/systemd-bus-proxyd.xml
+++ b/man/systemd-bus-proxyd.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>/usr/lib/systemd/systemd-bus-proxyd</command>
+ <command>&rootlibexecdir;/systemd-bus-proxyd</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="opt"><replaceable>PLACEHOLDER</replaceable></arg>
</cmdsynopsis>
diff --git a/man/systemd-bus-proxyd@.service.xml b/man/systemd-bus-proxyd@.service.xml
index dc4f07ff1b..9dabc4dd5f 100644
--- a/man/systemd-bus-proxyd@.service.xml
+++ b/man/systemd-bus-proxyd@.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-cat.xml b/man/systemd-cat.xml
index 9b1a8809dc..d51acd7cf8 100644
--- a/man/systemd-cat.xml
+++ b/man/systemd-cat.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-cgls.xml b/man/systemd-cgls.xml
index e8f0368f48..d3b2404a76 100644
--- a/man/systemd-cgls.xml
+++ b/man/systemd-cgls.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml
index f1ff218c39..b0c88001d4 100644
--- a/man/systemd-cgtop.xml
+++ b/man/systemd-cgtop.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml
index 5da3857c08..d40562b5e1 100644
--- a/man/systemd-coredump.xml
+++ b/man/systemd-coredump.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,7 +52,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/systemd-coredump</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-coredump</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-cryptsetup-generator.xml b/man/systemd-cryptsetup-generator.xml
index b6270358ea..c4747f72d3 100644
--- a/man/systemd-cryptsetup-generator.xml
+++ b/man/systemd-cryptsetup-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -46,7 +49,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-cryptsetup-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-cryptsetup-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-cryptsetup@.service.xml b/man/systemd-cryptsetup@.service.xml
index ea524851eb..efc213a917 100644
--- a/man/systemd-cryptsetup@.service.xml
+++ b/man/systemd-cryptsetup@.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-cryptsetup@.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-cryptsetup</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-cryptsetup</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-debug-generator.xml b/man/systemd-debug-generator.xml
index 5c5e9fc4a1..075ec58e7e 100644
--- a/man/systemd-debug-generator.xml
+++ b/man/systemd-debug-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -47,7 +50,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-debug-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-debug-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-delta.xml b/man/systemd-delta.xml
index 6a6460ffaa..69ea0411e6 100644
--- a/man/systemd-delta.xml
+++ b/man/systemd-delta.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-detect-virt.xml b/man/systemd-detect-virt.xml
index 40755a24d0..16ac4f3091 100644
--- a/man/systemd-detect-virt.xml
+++ b/man/systemd-detect-virt.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-efi-boot-generator.xml b/man/systemd-efi-boot-generator.xml
index 23464bcf15..1f8194dd62 100644
--- a/man/systemd-efi-boot-generator.xml
+++ b/man/systemd-efi-boot-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-efi-boot-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-efi-boot-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-escape.xml b/man/systemd-escape.xml
index 0c3b230526..6680bcf963 100644
--- a/man/systemd-escape.xml
+++ b/man/systemd-escape.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-firstboot.xml b/man/systemd-firstboot.xml
index 67289daa26..6ec54bf1c3 100644
--- a/man/systemd-firstboot.xml
+++ b/man/systemd-firstboot.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-fsck@.service.xml b/man/systemd-fsck@.service.xml
index e4ffcba168..7286cd8803 100644
--- a/man/systemd-fsck@.service.xml
+++ b/man/systemd-fsck@.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-fsck@.service</filename></para>
<para><filename>systemd-fsck-root.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-fsck</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-fsck</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-fstab-generator.xml b/man/systemd-fstab-generator.xml
index c09ed4b4da..383aab70ff 100644
--- a/man/systemd-fstab-generator.xml
+++ b/man/systemd-fstab-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -46,7 +49,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-fstab-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-fstab-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-getty-generator.xml b/man/systemd-getty-generator.xml
index 338925964d..12127d9c2a 100644
--- a/man/systemd-getty-generator.xml
+++ b/man/systemd-getty-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -47,7 +50,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-getty-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-getty-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-gpt-auto-generator.xml b/man/systemd-gpt-auto-generator.xml
index bcc64ec9b5..16ff100d73 100644
--- a/man/systemd-gpt-auto-generator.xml
+++ b/man/systemd-gpt-auto-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-gpt-auto-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-halt.service.xml b/man/systemd-halt.service.xml
index c94e2a1820..7e83a88fab 100644
--- a/man/systemd-halt.service.xml
+++ b/man/systemd-halt.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -56,7 +59,7 @@
<para><filename>systemd-poweroff.service</filename></para>
<para><filename>systemd-reboot.service</filename></para>
<para><filename>systemd-kexec.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-shutdown</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-shutdown</filename></para>
</refsynopsisdiv>
<refsect1>
@@ -75,7 +78,7 @@
<para>When these services are run, they ensure that PID 1 is
replaced by the
- <filename>/usr/lib/systemd/systemd-shutdown</filename> tool which
+ <filename>&rootlibexecdir;/systemd-shutdown</filename> tool which
is then responsible for the actual shutdown. Before shutting down,
this binary will try to unmount all remaining file systems,
disable all remaining swap devices, detach all remaining storage
@@ -90,7 +93,7 @@
<para>Immediately before executing the actual system
halt/poweroff/reboot/kexec <filename>systemd-shutdown</filename>
will run all executables in
- <filename>/usr/lib/systemd/system-shutdown/</filename> and pass
+ <filename>&rootlibexecdir;/system-shutdown/</filename> and pass
one arguments to them: either <literal>halt</literal>,
<literal>poweroff</literal>, <literal>reboot</literal> or
<literal>kexec</literal>, depending on the chosen action. All
diff --git a/man/systemd-hibernate-resume-generator.xml b/man/systemd-hibernate-resume-generator.xml
index d811b9b551..52837bc3f0 100644
--- a/man/systemd-hibernate-resume-generator.xml
+++ b/man/systemd-hibernate-resume-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -46,7 +49,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-hibernate-resume-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-hibernate-resume@.service.xml b/man/systemd-hibernate-resume@.service.xml
index 7d00827447..bca08b5fd5 100644
--- a/man/systemd-hibernate-resume@.service.xml
+++ b/man/systemd-hibernate-resume@.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-hibernate-resume@.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-hibernate-resume</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-hibernate-resume</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-hostnamed.service.xml b/man/systemd-hostnamed.service.xml
index 6990d41b02..2db1d035b1 100644
--- a/man/systemd-hostnamed.service.xml
+++ b/man/systemd-hostnamed.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-hostnamed.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-hostnamed</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-hostnamed</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-hwdb.xml b/man/systemd-hwdb.xml
index f1a14025b0..9a58776af2 100644
--- a/man/systemd-hwdb.xml
+++ b/man/systemd-hwdb.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refentry id="systemd-hwdb" conditional="ENABLE_HWDB">
<refentryinfo>
@@ -57,7 +60,7 @@
<varlistentry>
<term><option>--usr</option></term>
<listitem>
- <para>Generate in /usr/lib/udev instead of /etc/udev.</para>
+ <para>Generate in &udevlibexecdir; instead of /etc/udev.</para>
</listitem>
</varlistentry>
<varlistentry>
diff --git a/man/systemd-inhibit.xml b/man/systemd-inhibit.xml
index 9d85908f97..6ff07210d3 100644
--- a/man/systemd-inhibit.xml
+++ b/man/systemd-inhibit.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-initctl.service.xml b/man/systemd-initctl.service.xml
index 5c7f9a4a16..95288d068f 100644
--- a/man/systemd-initctl.service.xml
+++ b/man/systemd-initctl.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -52,7 +55,7 @@
<refsynopsisdiv>
<para><filename>systemd-initctl.service</filename></para>
<para><filename>systemd-initctl.socket</filename></para>
- <para><filename>/usr/lib/systemd/systemd-initctl</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-initctl</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-journal-gatewayd.service.xml b/man/systemd-journal-gatewayd.service.xml
index 6df2248578..f7588794cd 100644
--- a/man/systemd-journal-gatewayd.service.xml
+++ b/man/systemd-journal-gatewayd.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -54,7 +57,7 @@
<para><filename>systemd-journal-gatewayd.service</filename></para>
<para><filename>systemd-journal-gatewayd.socket</filename></para>
<cmdsynopsis>
- <command>/usr/lib/systemd/systemd-journal-gatewayd</command>
+ <command>&rootlibexecdir;/systemd-journal-gatewayd</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
</cmdsynopsis>
</refsynopsisdiv>
diff --git a/man/systemd-journal-remote.xml b/man/systemd-journal-remote.xml
index ebaca2657f..596479edb1 100644
--- a/man/systemd-journal-remote.xml
+++ b/man/systemd-journal-remote.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-journal-upload.xml b/man/systemd-journal-upload.xml
index 597f2a2d3e..5398ff42e2 100644
--- a/man/systemd-journal-upload.xml
+++ b/man/systemd-journal-upload.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -243,8 +246,8 @@ openssl ca -batch -config ca.conf -notext -in $CLIENT.csr -out $CLIENT.pem
<varname>TrustedCertificateFile=</varname>,
<varname>ServerCertificateFile=</varname>,
<varname>ServerKeyFile=</varname>, in
- <filename>/etc/systemd/journal-remote.conf</filename> and
- <filename>/etc/systemd/journal-upload.conf</filename>
+ <filename>&pkgsysconfdir;/journal-remote.conf</filename> and
+ <filename>&pkgsysconfdir;/journal-upload.conf</filename>
respectively. The default locations can be queried by using
<command>systemd-journal-remote --help</command> and
<command>systemd-journal-upload --help</command>.</para>
diff --git a/man/systemd-journald.service.xml b/man/systemd-journald.service.xml
index 8280d6c874..ead1eee3fb 100644
--- a/man/systemd-journald.service.xml
+++ b/man/systemd-journald.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -54,7 +57,7 @@
<para><filename>systemd-journald.service</filename></para>
<para><filename>systemd-journald.socket</filename></para>
<para><filename>systemd-journald-dev-log.socket</filename></para>
- <para><filename>/usr/lib/systemd/systemd-journald</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-journald</filename></para>
</refsynopsisdiv>
<refsect1>
@@ -199,7 +202,7 @@
<variablelist>
<varlistentry>
- <term><filename>/etc/systemd/journald.conf</filename></term>
+ <term><filename>&pkgsysconfdir;/journald.conf</filename></term>
<listitem><para>Configure
<command>systemd-journald</command>
diff --git a/man/systemd-localed.service.xml b/man/systemd-localed.service.xml
index 06aa78c0e4..1628054a3b 100644
--- a/man/systemd-localed.service.xml
+++ b/man/systemd-localed.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-localed.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-localed</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-localed</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-logind.service.xml b/man/systemd-logind.service.xml
index 5733e42cd1..1416d884ce 100644
--- a/man/systemd-logind.service.xml
+++ b/man/systemd-logind.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-logind.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-logind</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-logind</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-machine-id-commit.service.xml b/man/systemd-machine-id-commit.service.xml
index 7c8fc0874e..7bda76c4e5 100644
--- a/man/systemd-machine-id-commit.service.xml
+++ b/man/systemd-machine-id-commit.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -47,7 +50,7 @@
<refsynopsisdiv>
<para><filename>systemd-machine-id-commit.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-machine-id-commit</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-machine-id-commit</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-machine-id-commit.xml b/man/systemd-machine-id-commit.xml
index cfb1722063..0ebbfe7f07 100644
--- a/man/systemd-machine-id-commit.xml
+++ b/man/systemd-machine-id-commit.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine-id-setup.xml
index 182717f524..5a84a3b36c 100644
--- a/man/systemd-machine-id-setup.xml
+++ b/man/systemd-machine-id-setup.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-machined.service.xml b/man/systemd-machined.service.xml
index 999aeee1c6..a62e42c35b 100644
--- a/man/systemd-machined.service.xml
+++ b/man/systemd-machined.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-machined.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-machined</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-machined</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-modules-load.service.xml b/man/systemd-modules-load.service.xml
index dacd083bad..dc9e2a8554 100644
--- a/man/systemd-modules-load.service.xml
+++ b/man/systemd-modules-load.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-modules-load.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-modules-load</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-modules-load</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-networkd-wait-online.service.xml b/man/systemd-networkd-wait-online.service.xml
index f53b337daa..157671d6b2 100644
--- a/man/systemd-networkd-wait-online.service.xml
+++ b/man/systemd-networkd-wait-online.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-networkd-wait-online.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-networkd-wait-online</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-networkd-wait-online</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-networkd.service.xml b/man/systemd-networkd.service.xml
index 0bfe5519bc..1eef5b745b 100644
--- a/man/systemd-networkd.service.xml
+++ b/man/systemd-networkd.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-networkd.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-networkd</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-networkd</filename></para>
</refsynopsisdiv>
<refsect1>
@@ -75,10 +78,10 @@
<refsect1><title>Configuration Files</title>
<para>The configuration files are read from the files located in the
- system network directory <filename>/usr/lib/systemd/network</filename>,
+ system network directory <filename>&rootlibexecdir;/network</filename>,
the volatile runtime network directory
<filename>/run/systemd/network</filename> and the local administration
- network directory <filename>/etc/systemd/network</filename>.</para>
+ network directory <filename>&pkgsysconfdir;/network</filename>.</para>
<para>Networks are configured in <filename>.network</filename>
files, see
diff --git a/man/systemd-notify.xml b/man/systemd-notify.xml
index 06d5ae5319..1158473117 100644
--- a/man/systemd-notify.xml
+++ b/man/systemd-notify.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
index 06285edc0b..218c7291e0 100644
--- a/man/systemd-nspawn.xml
+++ b/man/systemd-nspawn.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-path.xml b/man/systemd-path.xml
index dfc75ee0ff..185a0cc901 100644
--- a/man/systemd-path.xml
+++ b/man/systemd-path.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-quotacheck.service.xml b/man/systemd-quotacheck.service.xml
index 9d4976274e..7673635a68 100644
--- a/man/systemd-quotacheck.service.xml
+++ b/man/systemd-quotacheck.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-quotacheck.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-quotacheck</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-quotacheck</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-random-seed.service.xml b/man/systemd-random-seed.service.xml
index 8c836688fe..580c3518c3 100644
--- a/man/systemd-random-seed.service.xml
+++ b/man/systemd-random-seed.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-random-seed.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-random-seed</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-random-seed</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-remount-fs.service.xml b/man/systemd-remount-fs.service.xml
index 9bc07fcdda..c8c3d16157 100644
--- a/man/systemd-remount-fs.service.xml
+++ b/man/systemd-remount-fs.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-remount-fs.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-remount-fs</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-remount-fs</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-resolved.service.xml b/man/systemd-resolved.service.xml
index 89ec5f8b19..892ebff7ad 100644
--- a/man/systemd-resolved.service.xml
+++ b/man/systemd-resolved.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-resolved.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-resolved</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-resolved</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-rfkill@.service.xml b/man/systemd-rfkill@.service.xml
index 709b09d818..befe001f29 100644
--- a/man/systemd-rfkill@.service.xml
+++ b/man/systemd-rfkill@.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-rfkill@.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-rfkill</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-rfkill</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-run.xml b/man/systemd-run.xml
index 71b365c8eb..ddd08e5b51 100644
--- a/man/systemd-run.xml
+++ b/man/systemd-run.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-sleep.conf.xml b/man/systemd-sleep.conf.xml
index 9a379ecb94..c5d26d0649 100644
--- a/man/systemd-sleep.conf.xml
+++ b/man/systemd-sleep.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,10 +52,10 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/sleep.conf</filename></para>
- <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/sleep.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/sleep.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/sleep.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
@@ -119,7 +122,7 @@
<para>The following options can be configured in the
<literal>[Sleep]</literal> section of
- <filename>/etc/systemd/sleep.conf</filename> or a
+ <filename>&pkgsysconfdir;/sleep.conf</filename> or a
<filename>sleep.conf.d</filename> file:</para>
<variablelist class='systemd-directives'>
diff --git a/man/systemd-socket-proxyd.xml b/man/systemd-socket-proxyd.xml
index ae4217b910..dc3baefe38 100644
--- a/man/systemd-socket-proxyd.xml
+++ b/man/systemd-socket-proxyd.xml
@@ -1,7 +1,10 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -113,7 +116,7 @@ Requires=nginx.service
After=nginx.service
[Service]
-ExecStart=/usr/lib/systemd/systemd-socket-proxyd /tmp/nginx.sock
+ExecStart=]]>&rootlibexecdir;<![CDATA[/systemd-socket-proxyd /tmp/nginx.sock
PrivateTmp=yes
PrivateNetwork=yes]]></programlisting>
</example>
@@ -156,7 +159,7 @@ After=nginx.service
JoinsNamespaceOf=nginx.service
[Service]
-ExecStart=/usr/lib/systemd/systemd-socket-proxyd 127.0.0.1:8080
+ExecStart=]]>&rootlibexecdir;<![CDATA[/systemd-socket-proxyd 127.0.0.1:8080
PrivateTmp=yes
PrivateNetwork=yes]]></programlisting>
</example>
diff --git a/man/systemd-suspend.service.xml b/man/systemd-suspend.service.xml
index a8beb86f4d..2722d1840a 100644
--- a/man/systemd-suspend.service.xml
+++ b/man/systemd-suspend.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -56,7 +59,7 @@
<para><filename>systemd-suspend.service</filename></para>
<para><filename>systemd-hibernate.service</filename></para>
<para><filename>systemd-hybrid-sleep.service</filename></para>
- <para><filename>/usr/lib/systemd/system-sleep</filename></para>
+ <para><filename>&rootlibexecdir;/system-sleep</filename></para>
</refsynopsisdiv>
<refsect1>
@@ -75,7 +78,7 @@
<para>Immediately before entering system suspend and/or
hibernation <filename>systemd-suspend.service</filename> (and the
other mentioned units, respectively) will run all executables in
- <filename>/usr/lib/systemd/system-sleep/</filename> and pass two
+ <filename>&rootlibexecdir;/system-sleep/</filename> and pass two
arguments to them. The first argument will be
<literal>pre</literal>, the second either
<literal>suspend</literal>, <literal>hibernate</literal>, or
@@ -87,7 +90,7 @@
until all executables have finished.</para>
<para>Note that scripts or binaries dropped in
- <filename>/usr/lib/systemd/system-sleep/</filename> are intended
+ <filename>&rootlibexecdir;/system-sleep/</filename> are intended
for local use only and should be considered hacks. If applications
want to be notified of system suspend/hibernation and resume,
there are much nicer interfaces available.</para>
@@ -104,7 +107,7 @@
<literal>mem</literal> into <filename>/sys/power/state</filename>,
to trigger the actual system suspend. What exactly is written
where can be configured in the <literal>[Sleep]</literal> section
- of <filename>/etc/systemd/sleep.conf</filename> or a
+ of <filename>&pkgsysconfdir;/sleep.conf</filename> or a
<filename>sleep.conf.d</filename> file. See
<citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
diff --git a/man/systemd-sysctl.service.xml b/man/systemd-sysctl.service.xml
index d4c1a7ebe3..f7da4cd71a 100644
--- a/man/systemd-sysctl.service.xml
+++ b/man/systemd-sysctl.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-sysctl.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-sysctl</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-sysctl</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-system-update-generator.xml b/man/systemd-system-update-generator.xml
index e7fc95c742..5c593b3906 100644
--- a/man/systemd-system-update-generator.xml
+++ b/man/systemd-system-update-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -46,7 +49,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-system-update-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-system-update-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
index c06accd791..5aa5da4706 100644
--- a/man/systemd-system.conf.xml
+++ b/man/systemd-system.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -51,14 +54,14 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/system.conf</filename></para>
- <para><filename>/etc/systemd/system.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/system.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/system.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/system.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/system.conf.d/*.conf</filename></para>
- <para><filename>/etc/systemd/user.conf</filename></para>
- <para><filename>/etc/systemd/user.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/system.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/user.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/user.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/user.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/user.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/user.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-sysusers.xml b/man/systemd-sysusers.xml
index a0c0f996ac..cbe4f2f9cb 100644
--- a/man/systemd-sysusers.xml
+++ b/man/systemd-sysusers.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-sysv-generator.xml b/man/systemd-sysv-generator.xml
index f2d56cbcd2..e7592d6692 100644
--- a/man/systemd-sysv-generator.xml
+++ b/man/systemd-sysv-generator.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -46,7 +49,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/systemd/system-generators/systemd-sysv-generator</filename></para>
+ <para><filename>&rootlibexecdir;/system-generators/systemd-sysv-generator</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-timedated.service.xml b/man/systemd-timedated.service.xml
index e44163aefb..3598490d14 100644
--- a/man/systemd-timedated.service.xml
+++ b/man/systemd-timedated.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-timedated.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-timedated</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-timedated</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-timesyncd.service.xml b/man/systemd-timesyncd.service.xml
index ac1af2d136..a1b364534b 100644
--- a/man/systemd-timesyncd.service.xml
+++ b/man/systemd-timesyncd.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -50,7 +53,7 @@
<refsynopsisdiv>
<para><filename>systemd-timesyncd.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-timesyncd</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-timesyncd</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index ceec06f840..f12f997f93 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-tty-ask-password-agent.xml b/man/systemd-tty-ask-password-agent.xml
index 2876fab644..dac3a3c02c 100644
--- a/man/systemd-tty-ask-password-agent.xml
+++ b/man/systemd-tty-ask-password-agent.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
index b18b22871f..c0d323033c 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refentry id="systemd-udevd.service"
xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -37,7 +40,7 @@
<para><filename>systemd-udevd-kernel.socket</filename></para>
<cmdsynopsis>
- <command>/usr/lib/systemd/systemd-udevd</command>
+ <command>&rootlibexecdir;/systemd-udevd</command>
<arg><option>--daemon</option></arg>
<arg><option>--debug</option></arg>
<arg><option>--children-max=</option></arg>
diff --git a/man/systemd-update-done.service.xml b/man/systemd-update-done.service.xml
index d65f175418..3f121582e9 100644
--- a/man/systemd-update-done.service.xml
+++ b/man/systemd-update-done.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-update-done.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-update-done</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-update-done</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-update-utmp.service.xml b/man/systemd-update-utmp.service.xml
index c8a9cb7c90..285691849f 100644
--- a/man/systemd-update-utmp.service.xml
+++ b/man/systemd-update-utmp.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -51,7 +54,7 @@
<refsynopsisdiv>
<para><filename>systemd-update-utmp.service</filename></para>
<para><filename>systemd-update-utmp-runlevel.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-update-utmp</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-update-utmp</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-user-sessions.service.xml b/man/systemd-user-sessions.service.xml
index e75ef11c4e..620648cfe8 100644
--- a/man/systemd-user-sessions.service.xml
+++ b/man/systemd-user-sessions.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-user-sessions.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-user-sessions</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-user-sessions</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd-vconsole-setup.service.xml b/man/systemd-vconsole-setup.service.xml
index 7c6ed08997..6c6d8e2af0 100644
--- a/man/systemd-vconsole-setup.service.xml
+++ b/man/systemd-vconsole-setup.service.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -48,7 +51,7 @@
<refsynopsisdiv>
<para><filename>systemd-vconsole-setup.service</filename></para>
- <para><filename>/usr/lib/systemd/systemd-vconsole-setup</filename></para>
+ <para><filename>&rootlibexecdir;/systemd-vconsole-setup</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/systemd.automount.xml b/man/systemd.automount.xml
index 9561590c5c..18c10d00f5 100644
--- a/man/systemd.automount.xml
+++ b/man/systemd.automount.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.device.xml b/man/systemd.device.xml
index ac6deafb18..96a20d14d1 100644
--- a/man/systemd.device.xml
+++ b/man/systemd.device.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 64877720bc..ea53722f0f 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -1,5 +1,8 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.generator.xml b/man/systemd.generator.xml
index 2285e91812..5ce0592a6e 100644
--- a/man/systemd.generator.xml
+++ b/man/systemd.generator.xml
@@ -59,14 +59,14 @@
<para>
<literallayout><filename>/run/systemd/system-generators/*</filename>
-<filename>/etc/systemd/system-generators/*</filename>
+<filename>&pkgsysconfdir;/system-generators/*</filename>
<filename>/usr/local/lib/systemd/system-generators/*</filename>
<filename>&systemgeneratordir;/*</filename></literallayout>
</para>
<para>
<literallayout><filename>/run/systemd/user-generators/*</filename>
-<filename>/etc/systemd/user-generators/*</filename>
+<filename>&pkgsysconfdir;/user-generators/*</filename>
<filename>/usr/local/lib/systemd/user-generators/*</filename>
<filename>&usergeneratordir;/*</filename></literallayout>
</para>
diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml
index a101006a7e..2cb010c0be 100644
--- a/man/systemd.journal-fields.xml
+++ b/man/systemd.journal-fields.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.kill.xml b/man/systemd.kill.xml
index e57f0e7242..ef828e081c 100644
--- a/man/systemd.kill.xml
+++ b/man/systemd.kill.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.link.xml b/man/systemd.link.xml
index 3fac760b01..5db06842bd 100644
--- a/man/systemd.link.xml
+++ b/man/systemd.link.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -56,21 +59,21 @@
<command>net_setup_link</command> udev builtin.</para>
<para>The link files are read from the files located in the system
- network directory <filename>/usr/lib/systemd/network</filename>,
+ network directory <filename>&rootlibexecdir;/network</filename>,
the volatile runtime network directory
<filename>/run/systemd/network</filename>, and the local
administration network directory
- <filename>/etc/systemd/network</filename>. Link files must have
+ <filename>&pkgsysconfdir;/network</filename>. Link files must have
the extension <filename>.link</filename>; other extensions are
ignored. All link files are collectively sorted and processed in
lexical order, regardless of the directories in which they live.
However, files with identical filenames replace each other. Files
in <filename>/etc</filename> have the highest priority, files in
<filename>/run</filename> take precedence over files with the same
- name in <filename>/usr/lib</filename>. This can be used to
+ name in <filename>&rootprefix;/lib</filename>. This can be used to
override a system-supplied link file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a
- link file in <filename>/usr/lib</filename>, pointing to
+ link file in <filename>&rootprefix;/lib</filename>, pointing to
<filename>/dev/null</filename>, disables the link file
entirely.</para>
@@ -382,7 +385,7 @@
<refsect1>
<title>Example</title>
<example>
- <title>/etc/systemd/network/wireless.link</title>
+ <title>&pkgsysconfdir;/network/wireless.link</title>
<programlisting>[Match]
MACAddress=12:34:56:78:9a:bc
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
index ffffc56936..f22c86adc1 100644
--- a/man/systemd.mount.xml
+++ b/man/systemd.mount.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
index 01c31c5ef5..786c7d478a 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -68,20 +71,20 @@
<para>The <filename>.netdev</filename> files are read from the
files located in the system network directory
- <filename>/usr/lib/systemd/network</filename>, the volatile
+ <filename>&rootlibexecdir;/network</filename>, the volatile
runtime network directory
<filename>/run/systemd/network</filename> and the local
administration network directory
- <filename>/etc/systemd/network</filename>. All configuration files
+ <filename>&pkgsysconfdir;/network</filename>. All configuration files
are collectively sorted and processed in lexical order, regardless
of the directories in which they live. However, files with
identical filenames replace each other. Files in
<filename>/etc</filename> have the highest priority, files in
<filename>/run</filename> take precedence over files with the same
- name in <filename>/usr/lib</filename>. This can be used to
+ name in <filename>&rootprefix;/lib</filename>. This can be used to
override a system-supplied configuration file with a local file if
needed; a symlink in <filename>/etc</filename> with the same name
- as a configuration file in <filename>/usr/lib</filename>, pointing
+ as a configuration file in <filename>&rootprefix;/lib</filename>, pointing
to <filename>/dev/null</filename>, disables the configuration file
entirely.</para>
@@ -842,7 +845,7 @@
<refsect1>
<title>Example</title>
<example>
- <title>/etc/systemd/network/bridge.netdev</title>
+ <title>&pkgsysconfdir;/network/bridge.netdev</title>
<programlisting>[NetDev]
Name=bridge0
@@ -850,7 +853,7 @@ Kind=bridge</programlisting>
</example>
<example>
- <title>/etc/systemd/network/vlan1.netdev</title>
+ <title>&pkgsysconfdir;/network/vlan1.netdev</title>
<programlisting>[Match]
Virtualization=no
@@ -863,7 +866,7 @@ Kind=vlan
Id=1</programlisting>
</example>
<example>
- <title>/etc/systemd/network/ipip.netdev</title>
+ <title>&pkgsysconfdir;/network/ipip.netdev</title>
<programlisting>[NetDev]
Name=ipip-tun
Kind=ipip
@@ -875,7 +878,7 @@ Remote=192.169.224.239
TTL=64</programlisting>
</example>
<example>
- <title>/etc/systemd/network/tap.netdev</title>
+ <title>&pkgsysconfdir;/network/tap.netdev</title>
<programlisting>[NetDev]
Name=tap-test
Kind=tap
@@ -885,7 +888,7 @@ MultiQueue=true
PacketInfo=true</programlisting> </example>
<example>
- <title>/etc/systemd/network/sit.netdev</title>
+ <title>&pkgsysconfdir;/network/sit.netdev</title>
<programlisting>[NetDev]
Name=sit-tun
Kind=sit
@@ -897,7 +900,7 @@ Remote=10.65.223.239</programlisting>
</example>
<example>
- <title>/etc/systemd/network/gre.netdev</title>
+ <title>&pkgsysconfdir;/network/gre.netdev</title>
<programlisting>[NetDev]
Name=gre-tun
Kind=gre
@@ -909,7 +912,7 @@ Remote=10.65.223.239</programlisting>
</example>
<example>
- <title>/etc/systemd/network/vti.netdev</title>
+ <title>&pkgsysconfdir;/network/vti.netdev</title>
<programlisting>[NetDev]
Name=vti-tun
@@ -922,7 +925,7 @@ Remote=10.65.223.239</programlisting>
</example>
<example>
- <title>/etc/systemd/network/veth.netdev</title>
+ <title>&pkgsysconfdir;/network/veth.netdev</title>
<programlisting>[NetDev]
Name=veth-test
Kind=veth
@@ -932,7 +935,7 @@ Name=veth-peer</programlisting>
</example>
<example>
- <title>/etc/systemd/network/dummy.netdev</title>
+ <title>&pkgsysconfdir;/network/dummy.netdev</title>
<programlisting>[NetDev]
Name=dummy-test
Kind=dummy
diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index bdbe239812..bd061c270a 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -64,20 +67,20 @@
<para>The <filename>.network</filename> files are read from the
files located in the system network directory
- <filename>/usr/lib/systemd/network</filename>, the volatile
+ <filename>&rootlibexecdir;/network</filename>, the volatile
runtime network directory
<filename>/run/systemd/network</filename> and the local
administration network directory
- <filename>/etc/systemd/network</filename>. All configuration files
+ <filename>&pkgsysconfdir;/network</filename>. All configuration files
are collectively sorted and processed in lexical order, regardless
of the directories in which they live. However, files with
identical filenames replace each other. Files in
<filename>/etc</filename> have the highest priority, files in
<filename>/run</filename> take precedence over files with the same
- name in <filename>/usr/lib</filename>. This can be used to
+ name in <filename>&rootprefix;/lib</filename>. This can be used to
override a system-supplied configuration file with a local file if
needed; a symlink in <filename>/etc</filename> with the same name
- as a configuration file in <filename>/usr/lib</filename>, pointing
+ as a configuration file in <filename>&rootprefix;/lib</filename>, pointing
to <filename>/dev/null</filename>, disables the configuration file
entirely.</para>
@@ -683,7 +686,7 @@
<refsect1>
<title>Example</title>
<example>
- <title>/etc/systemd/network/50-static.network</title>
+ <title>&pkgsysconfdir;/network/50-static.network</title>
<programlisting>[Match]
Name=enp2s0
@@ -694,7 +697,7 @@ Gateway=192.168.0.1</programlisting>
</example>
<example>
- <title>/etc/systemd/network/80-dhcp.network</title>
+ <title>&pkgsysconfdir;/network/80-dhcp.network</title>
<programlisting>[Match]
Name=en*
@@ -704,7 +707,7 @@ DHCP=yes</programlisting>
</example>
<example>
- <title>/etc/systemd/network/bridge-static.network</title>
+ <title>&pkgsysconfdir;/network/bridge-static.network</title>
<programlisting>[Match]
Name=bridge0
@@ -716,7 +719,7 @@ DNS=192.168.0.1</programlisting>
</example>
<example>
- <title>/etc/systemd/network/bridge-slave-interface.network</title>
+ <title>&pkgsysconfdir;/network/bridge-slave-interface.network</title>
<programlisting>[Match]
Name=enp2s0
@@ -725,7 +728,7 @@ Name=enp2s0
Bridge=bridge0</programlisting>
</example>
<example>
- <title>/etc/systemd/network/ipip.network</title>
+ <title>&pkgsysconfdir;/network/ipip.network</title>
<programlisting>[Match]
Name=em1
@@ -735,7 +738,7 @@ Tunnel=ipip-tun</programlisting>
</example>
<example>
- <title>/etc/systemd/network/sit.network</title>
+ <title>&pkgsysconfdir;/network/sit.network</title>
<programlisting>[Match]
Name=em1
@@ -745,7 +748,7 @@ Tunnel=sit-tun</programlisting>
</example>
<example>
- <title>/etc/systemd/network/gre.network</title>
+ <title>&pkgsysconfdir;/network/gre.network</title>
<programlisting>[Match]
Name=em1
@@ -755,7 +758,7 @@ Tunnel=gre-tun</programlisting>
</example>
<example>
- <title>/etc/systemd/network/vti.network</title>
+ <title>&pkgsysconfdir;/network/vti.network</title>
<programlisting>[Match]
Name=em1
diff --git a/man/systemd.path.xml b/man/systemd.path.xml
index d02bc92ae6..03b626b560 100644
--- a/man/systemd.path.xml
+++ b/man/systemd.path.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.preset.xml b/man/systemd.preset.xml
index 2f9add8d6c..4667f9d616 100644
--- a/man/systemd.preset.xml
+++ b/man/systemd.preset.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -46,12 +49,12 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/system-preset/*.preset</filename></para>
+ <para><filename>&pkgsysconfdir;/system-preset/*.preset</filename></para>
<para><filename>/run/systemd/system-preset/*.preset</filename></para>
- <para><filename>/usr/lib/systemd/system-preset/*.preset</filename></para>
- <para><filename>/etc/systemd/user-preset/*.preset</filename></para>
+ <para><filename>&rootlibexecdir;/system-preset/*.preset</filename></para>
+ <para><filename>&pkgsysconfdir;/user-preset/*.preset</filename></para>
<para><filename>/run/systemd/user-preset/*.preset</filename></para>
- <para><filename>/usr/lib/systemd/user-preset/*.preset</filename></para>
+ <para><filename>&rootlibexecdir;/user-preset/*.preset</filename></para>
</refsynopsisdiv>
<refsect1>
@@ -125,7 +128,7 @@
<para>If the administrator wants to disable a preset file supplied
by the vendor, the recommended way is to place a symlink to
<filename>/dev/null</filename> in
- <filename>/etc/systemd/system-preset/</filename> bearing the same
+ <filename>&pkgsysconfdir;/system-preset/</filename> bearing the same
filename.</para>
</refsect1>
@@ -133,7 +136,7 @@
<title>Example</title>
<example>
- <title>Default off example <filename>/usr/lib/systemd/system-preset/99-default.preset</filename>:</title>
+ <title>Default off example <filename>&rootlibexecdir;/system-preset/99-default.preset</filename>:</title>
<programlisting>disable *</programlisting>
</example>
@@ -144,7 +147,7 @@
suchlike.</para>
<example>
- <title>A GNOME spin example <filename>/usr/lib/systemd/system-preset/50-gnome.preset</filename>:</title>
+ <title>A GNOME spin example <filename>&rootlibexecdir;/system-preset/50-gnome.preset</filename>:</title>
<programlisting>enable gdm.service
enable colord.service
@@ -162,7 +165,7 @@ enable avahi-daemon.*</programlisting>
example like the one from the first example above.</para>
<example>
- <title>Administrator policy <filename>/etc/systemd/system-preset/00-lennart.preset</filename>:</title>
+ <title>Administrator policy <filename>&pkgsysconfdir;/system-preset/00-lennart.preset</filename>:</title>
<programlisting>enable httpd.service
enable sshd.service
diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml
index 8f4e7a3f16..82e21c6906 100644
--- a/man/systemd.resource-control.xml
+++ b/man/systemd.resource-control.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.scope.xml b/man/systemd.scope.xml
index fd65a851e2..f137cb7391 100644
--- a/man/systemd.scope.xml
+++ b/man/systemd.scope.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 7ff2adf4e9..0fe694ab7e 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.slice.xml b/man/systemd.slice.xml
index f0bac41763..c443528ab1 100644
--- a/man/systemd.slice.xml
+++ b/man/systemd.slice.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -90,7 +93,7 @@
slice specific configuration options are configured in
the [Slice] section. Currently, only generic resource control settings
as described in
- <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>7</manvolnum></citerefentry> are allowed.
+ <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry> are allowed.
</para>
<para>Unless <varname>DefaultDependencies=false</varname>
diff --git a/man/systemd.snapshot.xml b/man/systemd.snapshot.xml
index 96069c324a..4c1f40e814 100644
--- a/man/systemd.snapshot.xml
+++ b/man/systemd.snapshot.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 1e9778bc2a..1d0fa1bd16 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
index cf76aaf607..8db3050b58 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml
index c398677f43..d3ddc1ab4d 100644
--- a/man/systemd.swap.xml
+++ b/man/systemd.swap.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.target.xml b/man/systemd.target.xml
index e790e9b77a..884177e9fa 100644
--- a/man/systemd.target.xml
+++ b/man/systemd.target.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.time.xml b/man/systemd.time.xml
index da0729725d..570a20e5cf 100644
--- a/man/systemd.time.xml
+++ b/man/systemd.time.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml
index 20890f2270..5f7e80425e 100644
--- a/man/systemd.timer.xml
+++ b/man/systemd.timer.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 0aa1eeac77..8286cf3f78 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -64,20 +64,20 @@
<filename><replaceable>slice</replaceable>.slice</filename>,
<filename><replaceable>scope</replaceable>.scope</filename></para>
- <para><literallayout><filename>/etc/systemd/system/*</filename>
+ <para><literallayout><filename>&pkgsysconfdir;/system/*</filename>
<filename>/run/systemd/system/*</filename>
-<filename>/usr/lib/systemd/system/*</filename>
+<filename>&rootlibexecdir;/system/*</filename>
<filename>...</filename>
</literallayout></para>
<para><literallayout><filename>$XDG_CONFIG_HOME/systemd/user/*</filename>
<filename>$HOME/.config/systemd/user/*</filename>
-<filename>/etc/systemd/user/*</filename>
+<filename>&pkgsysconfdir;/user/*</filename>
<filename>$XDG_RUNTIME_DIR/systemd/user/*</filename>
<filename>/run/systemd/user/*</filename>
<filename>$XDG_DATA_HOME/systemd/user/*</filename>
<filename>$HOME/.local/share/systemd/user/*</filename>
-<filename>/usr/lib/systemd/user/*</filename>
+<filename>&rootlibexecdir;/user/*</filename>
<filename>...</filename>
</literallayout></para>
</refsynopsisdiv>
@@ -287,7 +287,7 @@
</thead>
<tbody>
<row>
- <entry><filename>/etc/systemd/system</filename></entry>
+ <entry><filename>&pkgsysconfdir;/system</filename></entry>
<entry>Local configuration</entry>
</row>
<row>
@@ -295,7 +295,7 @@
<entry>Runtime units</entry>
</row>
<row>
- <entry><filename>/usr/lib/systemd/system</filename></entry>
+ <entry><filename>&rootlibexecdir;/system</filename></entry>
<entry>Units of installed packages</entry>
</row>
</tbody>
@@ -326,7 +326,7 @@
<entry>User configuration (only used when $XDG_CONFIG_HOME is not set)</entry>
</row>
<row>
- <entry><filename>/etc/systemd/user</filename></entry>
+ <entry><filename>&pkgsysconfdir;/user</filename></entry>
<entry>Local configuration</entry>
</row>
<row>
@@ -346,7 +346,7 @@
<entry>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set)</entry>
</row>
<row>
- <entry><filename>/usr/lib/systemd/user</filename></entry>
+ <entry><filename>&rootlibexecdir;/user</filename></entry>
<entry>Units of packages that have been installed system-wide</entry>
</row>
</tbody>
@@ -1296,7 +1296,7 @@ ExecStart=/usr/sbin/foo-daemon
<para>After running <command>systemctl enable</command>, a
symlink
- <filename>/etc/systemd/system/multi-user.target.wants/foo.service</filename>
+ <filename>&pkgsysconfdir;/system/multi-user.target.wants/foo.service</filename>
linking to the actual unit will be created. It tells systemd to
pull in the unit when starting
<filename>multi-user.target</filename>. The inverse
@@ -1309,11 +1309,11 @@ ExecStart=/usr/sbin/foo-daemon
<para>There are two methods of overriding vendor settings in
unit files: copying the unit file from
- <filename>/usr/lib/systemd/system</filename> to
- <filename>/etc/systemd/system</filename> and modifying the
+ <filename>&rootlibexecdir;/system</filename> to
+ <filename>&pkgsysconfdir;/system</filename> and modifying the
chosen settings. Alternatively, one can create a directory named
<filename><replaceable>unit</replaceable>.d/</filename> within
- <filename>/etc/systemd/system</filename> and place a drop-in
+ <filename>&pkgsysconfdir;/system</filename> and place a drop-in
file <filename><replaceable>name</replaceable>.conf</filename>
there that only changes the specific settings one is interested
in. Note that multiple such drop-in files are read if
@@ -1343,7 +1343,7 @@ ExecStart=/usr/sbin/foo-daemon
load paths for further details.</para>
<para>Suppose there is a vendor-supplied unit
- <filename>/usr/lib/systemd/system/httpd.service</filename> with
+ <filename>&rootlibexecdir;/system/httpd.service</filename> with
the following contents:</para>
<programlisting>[Unit]
@@ -1375,7 +1375,7 @@ WantedBy=multi-user.target</programlisting>
the niceness of the service to its default value of 0.</para>
<para>The first possibility is to copy the unit file to
- <filename>/etc/systemd/system/httpd.service</filename> and
+ <filename>&pkgsysconfdir;/system/httpd.service</filename> and
change the chosen settings:</para>
<programlisting>[Unit]
@@ -1395,7 +1395,7 @@ WantedBy=multi-user.target</programlisting>
<para>Alternatively, the administrator could create a drop-in
file
- <filename>/etc/systemd/system/httpd.service.d/local.conf</filename>
+ <filename>&pkgsysconfdir;/system/httpd.service.d/local.conf</filename>
with the following contents:</para>
<programlisting>[Unit]
diff --git a/man/systemd.xml b/man/systemd.xml
index 4556d56969..5fa65a3631 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -438,7 +441,7 @@
by <command>pkg-config systemd
--variable=systemdsystemunitdir</command>. Other directories
checked are <filename>/usr/local/lib/systemd/system</filename>
- and <filename>/usr/lib/systemd/system</filename>. User
+ and <filename>&rootlibexecdir;/system</filename>. User
configuration always takes precedence. <command>pkg-config
systemd --variable=systemdsystemconfdir</command> returns the
path of the system configuration directory. Packages should
diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml
index 99aa07a1cc..3085f3dd01 100644
--- a/man/sysusers.d.xml
+++ b/man/sysusers.d.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/telinit.xml b/man/telinit.xml
index 02d31fbd46..ec7e8eace4 100644
--- a/man/telinit.xml
+++ b/man/telinit.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/timedatectl.xml b/man/timedatectl.xml
index 2d42b41d5e..d7bd052eff 100644
--- a/man/timedatectl.xml
+++ b/man/timedatectl.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -210,13 +213,13 @@ Password: ********
<programlisting>$ systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
- Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled)
+ Loaded: loaded (&rootlibexecdir;/system/systemd-timesyncd.service; enabled)
Active: active (running) since Mo 2015-03-30 14:20:38 CEST; 5s ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 595 (systemd-timesyn)
Status: "Using Time Server 216.239.38.15:123 (time4.google.com)."
CGroup: /system.slice/systemd-timesyncd.service
- └─595 /usr/lib/systemd/systemd-timesyncd
+ └─595 &rootlibexecdir;/systemd-timesyncd
...</programlisting>
</para>
</refsect1>
diff --git a/man/timesyncd.conf.xml b/man/timesyncd.conf.xml
index 89a651c662..c297d3254c 100644
--- a/man/timesyncd.conf.xml
+++ b/man/timesyncd.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
@@ -49,10 +52,10 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/etc/systemd/timesyncd.conf</filename></para>
- <para><filename>/etc/systemd/timesyncd.conf.d/*.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/timesyncd.conf</filename></para>
+ <para><filename>&pkgsysconfdir;/timesyncd.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/timesyncd.conf.d/*.conf</filename></para>
- <para><filename>/usr/lib/systemd/timesyncd.conf.d/*.conf</filename></para>
+ <para><filename>&rootlibexecdir;/timesyncd.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index 8d3ed37ae3..c37de65229 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/udev.conf.xml b/man/udev.conf.xml
index e104e53f5d..a10cc3cebe 100644
--- a/man/udev.conf.xml
+++ b/man/udev.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/man/udev.xml b/man/udev.xml
index d1a4f614cf..d5d8a17cdb 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refentry id="udev">
<refentryinfo>
@@ -55,17 +58,17 @@
<refsect1><title>Rules Files</title>
<para>The udev rules are read from the files located in the
- system rules directory <filename>/usr/lib/udev/rules.d</filename>,
+ system rules directory <filename>&udevlibexecdir;/rules.d</filename>,
the volatile runtime directory <filename>/run/udev/rules.d</filename>
and the local administration directory <filename>/etc/udev/rules.d</filename>.
All rules files are collectively sorted and processed in lexical order,
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <filename>/etc</filename>
have the highest priority, files in <filename>/run</filename> take precedence
- over files with the same name in <filename>/usr/lib</filename>. This can be
+ over files with the same name in <filename>&rootprefix;/lib</filename>. This can be
used to override a system-supplied rules file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a rules file in
- <filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
+ <filename>&rootprefix;/lib</filename>, pointing to <filename>/dev/null</filename>,
disables the rules file entirely. Rule files must have the extension
<filename>.rules</filename>; other extensions are ignored.</para>
@@ -421,7 +424,7 @@
<listitem>
<para>Execute an external program specified as the assigned
value. If no absolute path is given, the program is expected
- to live in <filename>/usr/lib/udev</filename>; otherwise, the
+ to live in <filename>&udevlibexecdir;</filename>; otherwise, the
absolute path must be specified.</para>
<para>This is the default if no <replaceable>type</replaceable>
is specified.</para>
diff --git a/man/udevadm.xml b/man/udevadm.xml
index 8ef9e23aa2..c7ef7279c9 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<refentry id="udevadm">
<refentryinfo>
diff --git a/man/user-system-options.xml b/man/user-system-options.xml
index 8616c54249..1e415ddd4c 100644
--- a/man/user-system-options.xml
+++ b/man/user-system-options.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<variablelist>
<varlistentry id='user'>
diff --git a/man/vconsole.conf.xml b/man/vconsole.conf.xml
index 27196d44e9..1c3bdd2e54 100644
--- a/man/vconsole.conf.xml
+++ b/man/vconsole.conf.xml
@@ -1,6 +1,9 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
<!--
This file is part of systemd.
diff --git a/po/es.po b/po/es.po
index 675f9721bf..811e36e81f 100644
--- a/po/es.po
+++ b/po/es.po
@@ -528,5 +528,5 @@ msgstr ""
#, c-format
msgid "Checking in progress on %d disk (%3.1f%% complete)"
msgid_plural "Checking in progress on %d disks (%3.1f%% complete)"
-msgstr[0] "Comprobando progreso en %d disco (%3.1f%% completado)"
-msgstr[1] "Comprobando progreso en %d discos (%3.1f%% completado)"
+msgstr[0] "Comprobando progreso en %d disco (%3.1f %% completado)"
+msgstr[1] "Comprobando progreso en %d discos (%3.1f %% completado)"
diff --git a/rules/60-block.rules b/rules/60-block.rules
index de41499cb7..a69d648023 100644
--- a/rules/60-block.rules
+++ b/rules/60-block.rules
@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
# watch metadata changes, caused by tools closing the device node which was opened for writing
-ACTION=="add", SUBSYSTEM=="block", KERNEL!="loop*|nvme*|sd*|vd*", OPTIONS+="watch"
+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*", OPTIONS+="watch"
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 3f803ceb9a..2aa15f3411 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -6,7 +6,7 @@
ACTION=="remove", GOTO="persistent_storage_end"
SUBSYSTEM!="block", GOTO="persistent_storage_end"
-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*", GOTO="persistent_storage_end"
+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|bcache*", GOTO="persistent_storage_end"
# ignore partitions that span the entire disk
TEST=="whole_disk", GOTO="persistent_storage_end"
diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl
index 7d2453cc2c..0e1b0a5562 100644
--- a/shell-completion/zsh/_bootctl
+++ b/shell-completion/zsh/_bootctl
@@ -4,7 +4,10 @@
{
local -a _bootctl_cmds
_bootctl_cmds=(
- "status:Show current firmware and boot settings"
+ "status:Show status of installed systemd-boot and EFI variables"
+ "install:Install systemd-boot to the ESP and EFI variables"
+ "update:Update systemd-boot in the ESP and EFI variables"
+ "remove:Remove systemd-boot from the ESP and EFI variables"
)
if (( CURRENT == 1 )); then
_describe -t commands 'bootctl command' _bootctl_cmds || compadd "$@"
@@ -22,4 +25,6 @@
_arguments \
{-h,--help}'[Prints a short help text and exits.]' \
'--version[Prints a short version string and exits.]' \
+ '--path=[Path to the EFI System Partition (ESP)]:path:_directories' \
+ '--no-variables[Do not touch EFI variables]' \
'*::bootctl command:_bootctl_command'
diff --git a/src/console/consoled-manager.c b/src/console/consoled-manager.c
index b288239cae..e560dcf524 100644
--- a/src/console/consoled-manager.c
+++ b/src/console/consoled-manager.c
@@ -21,16 +21,17 @@
#include <errno.h>
#include <stdlib.h>
-#include "consoled.h"
-#include "grdev.h"
-#include "idev.h"
-#include "log.h"
#include "sd-bus.h"
#include "sd-event.h"
#include "sd-login.h"
+#include "log.h"
+#include "signal-util.h"
+#include "util.h"
+#include "consoled.h"
+#include "idev.h"
+#include "grdev.h"
#include "sysview.h"
#include "unifont.h"
-#include "util.h"
int manager_new(Manager **out) {
_cleanup_(manager_freep) Manager *m = NULL;
diff --git a/src/console/consoled.c b/src/console/consoled.c
index 26dd068f5c..9f69e8983f 100644
--- a/src/console/consoled.c
+++ b/src/console/consoled.c
@@ -21,9 +21,10 @@
#include <errno.h>
#include <stdlib.h>
-#include "consoled.h"
-#include "log.h"
#include "sd-daemon.h"
+#include "log.h"
+#include "signal-util.h"
+#include "consoled.h"
int main(int argc, char *argv[]) {
_cleanup_(manager_freep) Manager *m = NULL;
diff --git a/src/core/automount.c b/src/core/automount.c
index 13f80c2abd..d847dc1629 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -747,7 +747,7 @@ static int automount_start(Unit *u) {
assert(a);
assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_FAILED);
- if (path_is_mount_point(a->where, false) > 0) {
+ if (path_is_mount_point(a->where, 0) > 0) {
log_unit_error(u, "Path %s is already a mount point, refusing start.", a->where);
return -EEXIST;
}
diff --git a/src/core/busname.c b/src/core/busname.c
index 17b85134e8..11f3b98009 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -22,15 +22,16 @@
#include <sys/mman.h>
#include "special.h"
+#include "formats-util.h"
+#include "signal-util.h"
#include "bus-kernel.h"
#include "bus-internal.h"
#include "bus-util.h"
-#include "service.h"
#include "kdbus.h"
#include "bus-policy.h"
+#include "service.h"
#include "dbus-busname.h"
#include "busname.h"
-#include "formats-util.h"
static const UnitActiveState state_translation_table[_BUSNAME_STATE_MAX] = {
[BUSNAME_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/dbus-kill.c b/src/core/dbus-kill.c
index fb29e147cb..3b8116281c 100644
--- a/src/core/dbus-kill.c
+++ b/src/core/dbus-kill.c
@@ -19,9 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "signal-util.h"
+#include "bus-util.h"
+
#include "kill.h"
#include "dbus-kill.h"
-#include "bus-util.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_kill_mode, kill_mode, KillMode);
diff --git a/src/core/execute.c b/src/core/execute.c
index e88a2dc0ed..4120493bda 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -49,14 +49,13 @@
#include <sys/apparmor.h>
#endif
+#include "sd-messages.h"
#include "rm-rf.h"
-#include "execute.h"
#include "strv.h"
#include "macro.h"
#include "capability.h"
#include "util.h"
#include "log.h"
-#include "sd-messages.h"
#include "ioprio.h"
#include "securebits.h"
#include "namespace.h"
@@ -79,6 +78,7 @@
#include "formats-util.h"
#include "process-util.h"
#include "terminal-util.h"
+#include "signal-util.h"
#ifdef HAVE_APPARMOR
#include "apparmor-util.h"
@@ -88,6 +88,8 @@
#include "seccomp-util.h"
#endif
+#include "execute.h"
+
#define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
#define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
diff --git a/src/core/kill.c b/src/core/kill.c
index 60a510eae6..2de71c6bf9 100644
--- a/src/core/kill.c
+++ b/src/core/kill.c
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-
-#include "kill.h"
#include "util.h"
+#include "signal-util.h"
+#include "kill.h"
void kill_context_init(KillContext *c) {
assert(c);
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 9415e92c90..df5fe6fb32 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -52,6 +52,7 @@
#include "errno-list.h"
#include "af-list.h"
#include "cap-list.h"
+#include "signal-util.h"
#include "bus-internal.h"
#ifdef HAVE_SECCOMP
@@ -609,7 +610,7 @@ int config_parse_exec(
else
skip = strneq(word, "\\;", MAX(l, 1U));
- r = cunescape_length(word + skip, l - skip, 0, &c);
+ r = cunescape_length(word + skip, l - skip, UNESCAPE_RELAX, &c);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to unescape command line, ignoring: %s", rvalue);
r = 0;
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
index e083c5b347..b3d22840cf 100644
--- a/src/core/machine-id-setup.c
+++ b/src/core/machine-id-setup.c
@@ -297,7 +297,7 @@ int machine_id_commit(const char *root) {
etc_machine_id = path_kill_slashes(x);
}
- r = path_is_mount_point(etc_machine_id, false);
+ r = path_is_mount_point(etc_machine_id, 0);
if (r < 0)
return log_error_errno(r, "Failed to determine whether %s is a mount point: %m", etc_machine_id);
if (r == 0) {
diff --git a/src/core/main.c b/src/core/main.c
index c39815b106..674e47e788 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -60,6 +60,10 @@
#include "bus-error.h"
#include "bus-util.h"
#include "selinux-util.h"
+#include "formats-util.h"
+#include "process-util.h"
+#include "terminal-util.h"
+#include "signal-util.h"
#include "manager.h"
#include "dbus-manager.h"
#include "load-fragment.h"
@@ -72,9 +76,6 @@
#include "ima-setup.h"
#include "smack-setup.h"
#include "kmod-setup.h"
-#include "formats-util.h"
-#include "process-util.h"
-#include "terminal-util.h"
static enum {
ACTION_RUN,
@@ -1496,7 +1497,7 @@ int main(int argc, char *argv[]) {
setsid();
/* Move out of the way, so that we won't block unmounts */
- assert_se(chdir("/") == 0);
+ assert_se(chdir("/") == 0);
/* Reset the console, but only if this is really init and we
* are freshly booted */
diff --git a/src/core/manager.c b/src/core/manager.c
index b931b0d71d..ae473d05c2 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -40,8 +40,6 @@
#include "sd-daemon.h"
#include "sd-messages.h"
-#include "manager.h"
-#include "transaction.h"
#include "hashmap.h"
#include "macro.h"
#include "strv.h"
@@ -65,14 +63,17 @@
#include "bus-common-errors.h"
#include "bus-error.h"
#include "bus-util.h"
-#include "dbus.h"
-#include "dbus-unit.h"
-#include "dbus-job.h"
-#include "dbus-manager.h"
#include "bus-kernel.h"
#include "time-util.h"
#include "process-util.h"
#include "terminal-util.h"
+#include "signal-util.h"
+#include "dbus.h"
+#include "dbus-unit.h"
+#include "dbus-job.h"
+#include "dbus-manager.h"
+#include "manager.h"
+#include "transaction.h"
/* Initial delay and the interval for printing status messages about running jobs */
#define JOBS_IN_PROGRESS_WAIT_USEC (5*USEC_PER_SEC)
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index ba96741e95..c35248eeae 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -156,7 +156,7 @@ static int mount_one(const MountPoint *p, bool relabel) {
if (relabel)
label_fix(p->where, true, true);
- r = path_is_mount_point(p->where, true);
+ r = path_is_mount_point(p->where, AT_SYMLINK_FOLLOW);
if (r < 0 && r != -ENOENT)
return r;
if (r > 0)
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 7d0b7e7e84..01a817bf23 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -499,7 +499,7 @@ int setup_namespace(
if (protect_system != PROTECT_SYSTEM_NO) {
const char *usr_dir, *boot_dir, *etc_dir;
- usr_dir = prefix_roota(root_directory, "/home");
+ usr_dir = prefix_roota(root_directory, "/usr");
boot_dir = prefix_roota(root_directory, "/boot");
boot_dir = strjoina("-", boot_dir);
etc_dir = prefix_roota(root_directory, "/etc");
diff --git a/src/core/service.c b/src/core/service.c
index 07347b99a4..c7e65772ea 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -47,6 +47,7 @@
#include "bus-kernel.h"
#include "formats-util.h"
#include "process-util.h"
+#include "signal-util.h"
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/socket.c b/src/core/socket.c
index 17b8a5059d..fc5eb1464a 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -47,8 +47,9 @@
#include "selinux-util.h"
#include "dbus-socket.h"
#include "unit.h"
-#include "socket.h"
#include "formats-util.h"
+#include "signal-util.h"
+#include "socket.h"
static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = {
[SOCKET_DEAD] = UNIT_INACTIVE,
diff --git a/src/efi-boot-generator/efi-boot-generator.c b/src/efi-boot-generator/efi-boot-generator.c
index 42b21f57de..e6b15c9bb0 100644
--- a/src/efi-boot-generator/efi-boot-generator.c
+++ b/src/efi-boot-generator/efi-boot-generator.c
@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
return EXIT_SUCCESS;
}
- r = path_is_mount_point("/boot", true);
+ r = path_is_mount_point("/boot", AT_SYMLINK_FOLLOW);
if (r > 0) {
log_debug("/boot is already a mount point, exiting.");
return EXIT_SUCCESS;
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 9bbe9ff673..f0e5c5f239 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -34,6 +34,7 @@
#include "util.h"
#include "process-util.h"
+#include "signal-util.h"
#include "special.h"
#include "bus-util.h"
#include "bus-error.h"
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index b192526186..b46e160888 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -297,7 +297,7 @@ static int probe_and_add_mount(
assert(where);
assert(description);
- if (path_is_mount_point(where, true) <= 0 &&
+ if (path_is_mount_point(where, AT_SYMLINK_FOLLOW) <= 0 &&
dir_is_empty(where) <= 0) {
log_debug("%s already populated, ignoring.", where);
return 0;
diff --git a/src/import/export.c b/src/import/export.c
index 201c5ab356..d4bc88e010 100644
--- a/src/import/export.c
+++ b/src/import/export.c
@@ -23,6 +23,7 @@
#include "sd-event.h"
#include "event-util.h"
+#include "signal-util.h"
#include "verbs.h"
#include "build.h"
#include "machine-image.h"
diff --git a/src/import/import-common.c b/src/import/import-common.c
index aede2f9b36..9711614000 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -26,6 +26,7 @@
#include "util.h"
#include "btrfs-util.h"
#include "capability.h"
+#include "signal-util.h"
#include "import-common.h"
int import_make_read_only_fd(int fd) {
diff --git a/src/import/import.c b/src/import/import.c
index f3072b3775..fff5a104b1 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -25,6 +25,7 @@
#include "event-util.h"
#include "verbs.h"
#include "build.h"
+#include "signal-util.h"
#include "machine-image.h"
#include "import-util.h"
#include "import-tar.h"
diff --git a/src/import/importd.c b/src/import/importd.c
index 45d1d93343..50566a6e5c 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -34,6 +34,7 @@
#include "path-util.h"
#include "import-util.h"
#include "process-util.h"
+#include "signal-util.h"
typedef struct Transfer Transfer;
typedef struct Manager Manager;
diff --git a/src/import/pull-common.c b/src/import/pull-common.c
index 59091ba7cb..d2588d4fa0 100644
--- a/src/import/pull-common.c
+++ b/src/import/pull-common.c
@@ -30,6 +30,7 @@
#include "pull-job.h"
#include "pull-common.h"
#include "process-util.h"
+#include "signal-util.h"
#define FILENAME_ESCAPE "/.#\"\'"
diff --git a/src/import/pull.c b/src/import/pull.c
index 0f2ad92187..eec4583868 100644
--- a/src/import/pull.c
+++ b/src/import/pull.c
@@ -25,6 +25,7 @@
#include "event-util.h"
#include "verbs.h"
#include "build.h"
+#include "signal-util.h"
#include "machine-image.h"
#include "import-util.h"
#include "pull-tar.h"
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index f87a939168..911e2a178b 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -30,6 +30,7 @@
#include <getopt.h>
#include "sd-daemon.h"
+#include "signal-util.h"
#include "journal-file.h"
#include "journald-native.h"
#include "socket-util.h"
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index ddbb8731e2..ddb1ef0396 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -33,8 +33,9 @@
#include "mkdir.h"
#include "conf-parser.h"
#include "sigbus.h"
-#include "journal-upload.h"
#include "formats-util.h"
+#include "signal-util.h"
+#include "journal-upload.h"
#define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-upload.pem"
#define CERT_FILE CERTIFICATE_ROOT "/certs/journal-upload.pem"
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index bcb0ff9c39..381bf72776 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -39,6 +39,7 @@
#include "sigbus.h"
#include "process-util.h"
#include "terminal-util.h"
+#include "signal-util.h"
static enum {
ACTION_NONE,
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index b3a4b53080..3353024f4e 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -25,6 +25,10 @@
#include <sys/statvfs.h>
#include <sys/mman.h>
+#ifdef HAVE_SELINUX
+#include <selinux/selinux.h>
+#endif
+
#include <libudev.h>
#include "sd-journal.h"
@@ -43,6 +47,7 @@
#include "formats-util.h"
#include "process-util.h"
#include "hostname-util.h"
+#include "signal-util.h"
#include "journal-internal.h"
#include "journal-vacuum.h"
#include "journal-authenticate.h"
@@ -54,10 +59,6 @@
#include "journald-audit.h"
#include "journald-server.h"
-#ifdef HAVE_SELINUX
-#include <selinux/selinux.h>
-#endif
-
#define USER_JOURNALS_MAX 1024
#define DEFAULT_SYNC_INTERVAL_USEC (5*USEC_PER_MINUTE)
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
index d433e00a5c..4c9b1f0327 100644
--- a/src/kernel-install/90-loaderentry.install
+++ b/src/kernel-install/90-loaderentry.install
@@ -43,14 +43,14 @@ fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
- readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
+ read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
- read -a line -r < /proc/cmdline
+ read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue
- BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
+ BOOT_OPTIONS+=("$i")
done
fi
diff --git a/src/libsystemd-terminal/evcat.c b/src/libsystemd-terminal/evcat.c
index d274225ed0..bfa166c489 100644
--- a/src/libsystemd-terminal/evcat.c
+++ b/src/libsystemd-terminal/evcat.c
@@ -35,19 +35,20 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
-#include <systemd/sd-login.h>
#include <termios.h>
#include <unistd.h>
#include <xkbcommon/xkbcommon.h>
+#include "sd-bus.h"
+#include "sd-event.h"
+#include "sd-login.h"
#include "build.h"
#include "event-util.h"
-#include "idev.h"
#include "macro.h"
+#include "signal-util.h"
+#include "util.h"
+#include "idev.h"
#include "sysview.h"
#include "term-internal.h"
-#include "util.h"
typedef struct Evcat Evcat;
diff --git a/src/libsystemd-terminal/grdev-drm.c b/src/libsystemd-terminal/grdev-drm.c
index 01a70fd320..4cee95f469 100644
--- a/src/libsystemd-terminal/grdev-drm.c
+++ b/src/libsystemd-terminal/grdev-drm.c
@@ -27,8 +27,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/types.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
#include <unistd.h>
/* Yuck! DRM headers need system headers included first.. but we have to
@@ -37,12 +35,14 @@
#include <drm_fourcc.h>
#include <drm_mode.h>
-#include "bus-util.h"
+#include "sd-bus.h"
+#include "sd-event.h"
#include "hashmap.h"
-#include "grdev.h"
-#include "grdev-internal.h"
#include "macro.h"
#include "util.h"
+#include "bus-util.h"
+#include "grdev.h"
+#include "grdev-internal.h"
#define GRDRM_MAX_TRIES (16)
diff --git a/src/libsystemd-terminal/grdev-internal.h b/src/libsystemd-terminal/grdev-internal.h
index f455dd4172..46d65f0248 100644
--- a/src/libsystemd-terminal/grdev-internal.h
+++ b/src/libsystemd-terminal/grdev-internal.h
@@ -25,12 +25,12 @@
#include <libudev.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
-#include "grdev.h"
+#include "sd-bus.h"
+#include "sd-event.h"
#include "hashmap.h"
#include "list.h"
#include "util.h"
+#include "grdev.h"
typedef struct grdev_tile grdev_tile;
typedef struct grdev_display_cache grdev_display_cache;
diff --git a/src/libsystemd-terminal/grdev.c b/src/libsystemd-terminal/grdev.c
index feed579295..c386e65982 100644
--- a/src/libsystemd-terminal/grdev.c
+++ b/src/libsystemd-terminal/grdev.c
@@ -22,14 +22,14 @@
#include <libudev.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
-#include "grdev.h"
-#include "grdev-internal.h"
+#include "sd-bus.h"
+#include "sd-event.h"
#include "hashmap.h"
#include "login-shared.h"
#include "macro.h"
#include "util.h"
+#include "grdev.h"
+#include "grdev-internal.h"
static void pipe_enable(grdev_pipe *pipe);
static void pipe_disable(grdev_pipe *pipe);
diff --git a/src/libsystemd-terminal/grdev.h b/src/libsystemd-terminal/grdev.h
index db2a508fd8..110d24e6d5 100644
--- a/src/libsystemd-terminal/grdev.h
+++ b/src/libsystemd-terminal/grdev.h
@@ -56,8 +56,8 @@
#include <libudev.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
+#include "sd-bus.h"
+#include "sd-event.h"
#include "util.h"
typedef struct grdev_fb grdev_fb;
diff --git a/src/libsystemd-terminal/idev-evdev.c b/src/libsystemd-terminal/idev-evdev.c
index 64e703eb67..f1a18b91d3 100644
--- a/src/libsystemd-terminal/idev-evdev.c
+++ b/src/libsystemd-terminal/idev-evdev.c
@@ -24,13 +24,13 @@
#include <libudev.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
+#include "sd-bus.h"
+#include "sd-event.h"
+#include "macro.h"
+#include "util.h"
#include "bus-util.h"
#include "idev.h"
#include "idev-internal.h"
-#include "macro.h"
-#include "util.h"
typedef struct idev_evdev idev_evdev;
typedef struct unmanaged_evdev unmanaged_evdev;
diff --git a/src/libsystemd-terminal/idev-internal.h b/src/libsystemd-terminal/idev-internal.h
index a159aef211..a02a16c408 100644
--- a/src/libsystemd-terminal/idev-internal.h
+++ b/src/libsystemd-terminal/idev-internal.h
@@ -26,13 +26,13 @@
#include <linux/input.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
#include <xkbcommon/xkbcommon.h>
+#include "sd-bus.h"
+#include "sd-event.h"
#include "hashmap.h"
-#include "idev.h"
#include "list.h"
#include "util.h"
+#include "idev.h"
typedef struct idev_link idev_link;
typedef struct idev_device_vtable idev_device_vtable;
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
index ef56ee2482..93f49e9458 100644
--- a/src/libsystemd-terminal/idev-keyboard.c
+++ b/src/libsystemd-terminal/idev-keyboard.c
@@ -21,17 +21,17 @@
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-compose.h>
-#include "bus-util.h"
+#include "sd-bus.h"
+#include "sd-event.h"
#include "hashmap.h"
+#include "macro.h"
+#include "util.h"
+#include "bus-util.h"
#include "idev.h"
#include "idev-internal.h"
-#include "macro.h"
#include "term-internal.h"
-#include "util.h"
typedef struct kbdtbl kbdtbl;
typedef struct kbdmap kbdmap;
diff --git a/src/libsystemd-terminal/idev.c b/src/libsystemd-terminal/idev.c
index 0ba2b28ab7..b187934977 100644
--- a/src/libsystemd-terminal/idev.c
+++ b/src/libsystemd-terminal/idev.c
@@ -22,14 +22,14 @@
#include <libudev.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
+#include "sd-bus.h"
+#include "sd-event.h"
#include "hashmap.h"
-#include "idev.h"
-#include "idev-internal.h"
#include "login-shared.h"
#include "macro.h"
#include "util.h"
+#include "idev.h"
+#include "idev-internal.h"
static void element_open(idev_element *e);
static void element_close(idev_element *e);
diff --git a/src/libsystemd-terminal/idev.h b/src/libsystemd-terminal/idev.h
index 0e846179e6..241677cbbe 100644
--- a/src/libsystemd-terminal/idev.h
+++ b/src/libsystemd-terminal/idev.h
@@ -28,9 +28,9 @@
#include <libudev.h>
#include <linux/input.h>
#include <stdbool.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
#include <xkbcommon/xkbcommon.h>
+#include "sd-bus.h"
+#include "sd-event.h"
typedef struct idev_data idev_data;
typedef struct idev_data_evdev idev_data_evdev;
diff --git a/src/libsystemd-terminal/modeset.c b/src/libsystemd-terminal/modeset.c
index 621d6c4fa3..f3a60e1fb0 100644
--- a/src/libsystemd-terminal/modeset.c
+++ b/src/libsystemd-terminal/modeset.c
@@ -35,18 +35,18 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
-#include <systemd/sd-login.h>
#include <termios.h>
#include <unistd.h>
-
+#include "sd-bus.h"
+#include "sd-event.h"
+#include "sd-login.h"
#include "build.h"
-#include "grdev.h"
#include "macro.h"
-#include "sysview.h"
-#include "util.h"
#include "random-util.h"
+#include "signal-util.h"
+#include "util.h"
+#include "grdev.h"
+#include "sysview.h"
typedef struct Modeset Modeset;
diff --git a/src/libsystemd-terminal/subterm.c b/src/libsystemd-terminal/subterm.c
index 983a2a14ab..d10e2f549f 100644
--- a/src/libsystemd-terminal/subterm.c
+++ b/src/libsystemd-terminal/subterm.c
@@ -34,13 +34,14 @@
#include <string.h>
#include <sys/ioctl.h>
#include <termios.h>
+#include "sd-event.h"
#include "macro.h"
#include "pty.h"
#include "ring.h"
-#include "sd-event.h"
-#include "term-internal.h"
-#include "util.h"
+#include "signal-util.h"
#include "utf8.h"
+#include "util.h"
+#include "term-internal.h"
typedef struct Output Output;
typedef struct Terminal Terminal;
diff --git a/src/libsystemd-terminal/sysview-internal.h b/src/libsystemd-terminal/sysview-internal.h
index f1fd4b5f53..251c8d7300 100644
--- a/src/libsystemd-terminal/sysview-internal.h
+++ b/src/libsystemd-terminal/sysview-internal.h
@@ -25,13 +25,13 @@
#include <libudev.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
+#include "sd-bus.h"
+#include "sd-event.h"
#include "hashmap.h"
#include "list.h"
#include "macro.h"
-#include "sysview.h"
#include "util.h"
+#include "sysview.h"
/*
* Devices
diff --git a/src/libsystemd-terminal/sysview.c b/src/libsystemd-terminal/sysview.c
index 1e13167a79..c8bbce43d3 100644
--- a/src/libsystemd-terminal/sysview.c
+++ b/src/libsystemd-terminal/sysview.c
@@ -23,15 +23,15 @@
#include <libudev.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
-#include <systemd/sd-login.h>
-#include "bus-util.h"
+#include "sd-bus.h"
+#include "sd-event.h"
+#include "sd-login.h"
#include "macro.h"
-#include "sysview.h"
-#include "sysview-internal.h"
#include "udev-util.h"
#include "util.h"
+#include "bus-util.h"
+#include "sysview.h"
+#include "sysview-internal.h"
static int context_raise_session_control(sysview_context *c, sysview_session *session, int error);
diff --git a/src/libsystemd-terminal/sysview.h b/src/libsystemd-terminal/sysview.h
index 71e56e7ebf..a5e7a38df3 100644
--- a/src/libsystemd-terminal/sysview.h
+++ b/src/libsystemd-terminal/sysview.h
@@ -37,8 +37,8 @@
#pragma once
#include <stdbool.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-event.h>
+#include "sd-bus.h"
+#include "sd-event.h"
typedef struct sysview_event sysview_event;
typedef struct sysview_device sysview_device;
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index fa4c28174d..43ddfc651d 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -429,7 +429,7 @@ static int bus_populate_creds_from_items(
c->mask |= SD_BUS_CREDS_PPID;
} else if (item->pids.pid == 1) {
/* The structure doesn't
- * really distuingish the case
+ * really distinguish the case
* where a process has no
* parent and where we don't
* know it because it could
diff --git a/src/libsystemd/sd-bus/bus-creds.c b/src/libsystemd/sd-bus/bus-creds.c
index fed66823c7..4d67619cf8 100644
--- a/src/libsystemd/sd-bus/bus-creds.c
+++ b/src/libsystemd/sd-bus/bus-creds.c
@@ -303,7 +303,7 @@ _public_ int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid) {
if (!(c->mask & SD_BUS_CREDS_PPID))
return -ENODATA;
- /* PID 1 has no parent process. Let's distuingish the case of
+ /* PID 1 has no parent process. Let's distinguish the case of
* not knowing and not having a parent process by the returned
* error code. */
if (c->ppid == 0)
@@ -989,7 +989,7 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) {
if (missing & SD_BUS_CREDS_EXE) {
r = get_process_exe(pid, &c->exe);
if (r == -ESRCH) {
- /* Unfortunately we cannot really distuingish
+ /* Unfortunately we cannot really distinguish
* the case here where the process does not
* exist, and /proc/$PID/exe being unreadable
* because $PID is a kernel thread. Hence,
@@ -1101,7 +1101,7 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) {
}
/* In case only the exe path was to be read we cannot
- * distuingish the case where the exe path was unreadable
+ * distinguish the case where the exe path was unreadable
* because the process was a kernel thread, or when the
* process didn't exist at all. Hence, let's do a final check,
* to be sure. */
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
index 881efb176a..4fffc6581d 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -24,12 +24,13 @@
#include <unistd.h>
#include <poll.h>
+#include "sd-daemon.h"
#include "util.h"
#include "macro.h"
#include "missing.h"
#include "utf8.h"
-#include "sd-daemon.h"
#include "formats-util.h"
+#include "signal-util.h"
#include "sd-bus.h"
#include "bus-socket.h"
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
index 5e375af206..99937799b3 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/libsystemd/sd-bus/bus-util.c
@@ -30,6 +30,7 @@
#include "path-util.h"
#include "missing.h"
#include "set.h"
+#include "signal-util.h"
#include "unit-name.h"
#include "sd-bus.h"
diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c
index ce4862d7f0..3692d46e06 100644
--- a/src/libsystemd/sd-device/device-enumerator.c
+++ b/src/libsystemd/sd-device/device-enumerator.c
@@ -367,11 +367,11 @@ static bool match_sysattr(sd_device_enumerator *enumerator, sd_device *device) {
assert(enumerator);
assert(device);
- HASHMAP_FOREACH_KEY(sysattr, value, enumerator->nomatch_sysattr, i)
+ HASHMAP_FOREACH_KEY(value, sysattr, enumerator->nomatch_sysattr, i)
if (match_sysattr_value(device, sysattr, value))
return false;
- HASHMAP_FOREACH_KEY(sysattr, value, enumerator->match_sysattr, i)
+ HASHMAP_FOREACH_KEY(value, sysattr, enumerator->match_sysattr, i)
if (!match_sysattr_value(device, sysattr, value))
return false;
@@ -389,7 +389,7 @@ static bool match_property(sd_device_enumerator *enumerator, sd_device *device)
if (hashmap_isempty(enumerator->match_property))
return true;
- HASHMAP_FOREACH_KEY(property, value, enumerator->match_property, i) {
+ HASHMAP_FOREACH_KEY(value, property, enumerator->match_property, i) {
const char *property_dev, *value_dev;
FOREACH_DEVICE_PROPERTY(device, property_dev, value_dev) {
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c
index 3cadedbf4a..2e60433246 100644
--- a/src/libsystemd/sd-device/device-private.c
+++ b/src/libsystemd/sd-device/device-private.c
@@ -636,10 +636,10 @@ int device_new_from_nulstr(sd_device **ret, uint8_t *nulstr, size_t len) {
static int device_update_properties_bufs(sd_device *device) {
const char *val, *prop;
- char **buf_strv = NULL;
- uint8_t *buf_nulstr = NULL;
- size_t allocated_nulstr = 0, allocated_strv = 0;
- size_t nulstr_len = 0, strv_size = 0;
+ _cleanup_free_ char **buf_strv = NULL;
+ _cleanup_free_ uint8_t *buf_nulstr = NULL;
+ size_t allocated_nulstr = 0;
+ size_t nulstr_len = 0, num = 0, i = 0;
assert(device);
@@ -655,20 +655,29 @@ static int device_update_properties_bufs(sd_device *device) {
if (!buf_nulstr)
return -ENOMEM;
- buf_strv = GREEDY_REALLOC0(buf_strv, allocated_strv, strv_size + 2);
- if (!buf_strv)
- return -ENOMEM;
-
- buf_strv[++ strv_size] = (char *)&buf_nulstr[nulstr_len];
strscpyl((char *)buf_nulstr + nulstr_len, len + 1, prop, "=", val, NULL);
nulstr_len += len + 1;
+ ++num;
+ }
+
+ /* build buf_strv from buf_nulstr */
+ buf_strv = new0(char *, num + 1);
+ if (!buf_strv)
+ return -ENOMEM;
+
+ NULSTR_FOREACH(val, (char*) buf_nulstr) {
+ buf_strv[i] = (char *) val;
+ assert(i < num);
+ i++;
}
free(device->properties_nulstr);
- free(device->properties_strv);
device->properties_nulstr = buf_nulstr;
+ buf_nulstr = NULL;
device->properties_nulstr_len = nulstr_len;
+ free(device->properties_strv);
device->properties_strv = buf_strv;
+ buf_strv = NULL;
device->properties_buf_outdated = false;
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 0dc4680376..cc8bc50c04 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -33,6 +33,7 @@
#include "missing.h"
#include "set.h"
#include "list.h"
+#include "signal-util.h"
#include "sd-event.h"
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c
index 721700be7b..94e98e0077 100644
--- a/src/libsystemd/sd-event/test-event.c
+++ b/src/libsystemd/sd-event/test-event.c
@@ -23,6 +23,7 @@
#include "log.h"
#include "util.h"
#include "macro.h"
+#include "signal-util.h"
static int prepare_handler(sd_event_source *s, void *userdata) {
log_info("preparing %c", PTR_TO_INT(userdata));
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 4a5a618472..02d240c704 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -43,6 +43,7 @@
#include "verbs.h"
#include "process-util.h"
#include "terminal-util.h"
+#include "signal-util.h"
static char **arg_property = NULL;
static bool arg_all = false;
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 1f5cf865b1..10a9df0961 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1964,6 +1964,11 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
m->scheduled_shutdown_type = NULL;
m->scheduled_shutdown_timeout = 0;
+ if (m->unlink_nologin) {
+ (void) unlink("/run/nologin");
+ m->unlink_nologin = false;
+ }
+
if (cancelled) {
_cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
const char *tty = NULL;
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 71bff96728..dc3db9abda 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -320,7 +320,7 @@ static int user_mkdir_runtime_path(User *u) {
} else
p = u->runtime_path;
- if (path_is_mount_point(p, false) <= 0) {
+ if (path_is_mount_point(p, 0) <= 0) {
_cleanup_free_ char *t = NULL;
(void) mkdir(p, 0700);
diff --git a/src/login/logind.c b/src/login/logind.c
index 7520f1345b..00f8dbdab2 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -30,9 +30,10 @@
#include "conf-parser.h"
#include "bus-util.h"
#include "bus-error.h"
-#include "logind.h"
#include "udev-util.h"
#include "formats-util.h"
+#include "signal-util.h"
+#include "logind.h"
static void manager_free(Manager *m);
@@ -170,7 +171,7 @@ static void manager_free(Manager *m) {
udev_unref(m->udev);
if (m->unlink_nologin)
- unlink("/run/nologin");
+ (void) unlink("/run/nologin");
bus_verify_polkit_async_registry_free(m->polkit_registry);
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index b21a33941a..c86c36c2de 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -54,6 +54,7 @@
#include "import-util.h"
#include "process-util.h"
#include "terminal-util.h"
+#include "signal-util.h"
static char **arg_property = NULL;
static bool arg_all = false;
diff --git a/src/machine/machined.c b/src/machine/machined.c
index 1e862ad8f2..754c770040 100644
--- a/src/machine/machined.c
+++ b/src/machine/machined.c
@@ -28,9 +28,10 @@
#include "bus-util.h"
#include "bus-error.h"
#include "label.h"
+#include "formats-util.h"
+#include "signal-util.h"
#include "machine-image.h"
#include "machined.h"
-#include "formats-util.h"
Manager *manager_new(void) {
Manager *m;
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 69b4ab4a5c..3454394977 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -62,7 +62,7 @@ static int link_get_type_string(int iftype, sd_device *d, char **ret) {
assert(ret);
if (iftype == ARPHRD_ETHER && d) {
- const char *devtype, *id = NULL;
+ const char *devtype = NULL, *id = NULL;
/* WLANs have iftype ARPHRD_ETHER, but we want
* to show a more useful type string for
* them */
diff --git a/src/network/networkd-wait-online.c b/src/network/networkd-wait-online.c
index f0ca6def87..6a96f1de55 100644
--- a/src/network/networkd-wait-online.c
+++ b/src/network/networkd-wait-online.c
@@ -21,11 +21,10 @@
#include <getopt.h>
#include "sd-daemon.h"
-
-#include "networkd-wait-online.h"
-
#include "strv.h"
#include "build.h"
+#include "signal-util.h"
+#include "networkd-wait-online.h"
static bool arg_quiet = false;
static usec_t arg_timeout = 120 * USEC_PER_SEC;
diff --git a/src/network/networkd.c b/src/network/networkd.c
index 543a4e4d95..41ec7cf904 100644
--- a/src/network/networkd.c
+++ b/src/network/networkd.c
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "capability.h"
#include "sd-daemon.h"
-
+#include "capability.h"
+#include "signal-util.h"
#include "networkd.h"
int main(int argc, char *argv[]) {
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 23bb959171..4211a3d779 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -96,6 +96,7 @@
#include "process-util.h"
#include "terminal-util.h"
#include "hostname-util.h"
+#include "signal-util.h"
#ifdef HAVE_SECCOMP
#include "seccomp-util.h"
@@ -1099,7 +1100,7 @@ static int mount_all(const char *dest, bool userns) {
if (!where)
return log_oom();
- r = path_is_mount_point(where, true);
+ r = path_is_mount_point(where, AT_SYMLINK_FOLLOW);
if (r < 0 && r != -ENOENT)
return log_error_errno(r, "Failed to detect whether %s is a mount point: %m", where);
@@ -1298,7 +1299,7 @@ static int mount_cgroup_hierarchy(const char *dest, const char *controller, cons
to = strjoina(dest, "/sys/fs/cgroup/", hierarchy);
- r = path_is_mount_point(to, false);
+ r = path_is_mount_point(to, 0);
if (r < 0 && r != -ENOENT)
return log_error_errno(r, "Failed to determine if %s is mounted already: %m", to);
if (r > 0)
@@ -2154,7 +2155,7 @@ static int setup_journal(const char *directory) {
p = strjoina("/var/log/journal/", id);
q = prefix_roota(directory, p);
- if (path_is_mount_point(p, false) > 0) {
+ if (path_is_mount_point(p, 0) > 0) {
if (arg_link_journal != LINK_AUTO) {
log_error("%s: already a mount point, refusing to use for journal", p);
return -EEXIST;
@@ -2163,7 +2164,7 @@ static int setup_journal(const char *directory) {
return 0;
}
- if (path_is_mount_point(q, false) > 0) {
+ if (path_is_mount_point(q, 0) > 0) {
if (arg_link_journal != LINK_AUTO) {
log_error("%s: already a mount point, refusing to use for journal", q);
return -EEXIST;
@@ -4507,7 +4508,7 @@ int main(int argc, char *argv[]) {
* the specified is not a mount point we
* create the new snapshot in the parent
* directory, just next to it. */
- r = path_is_mount_point(arg_directory, false);
+ r = path_is_mount_point(arg_directory, 0);
if (r < 0) {
log_error_errno(r, "Failed to determine whether directory %s is mount point: %m", arg_directory);
goto finish;
diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c
index a09531b26f..e701fc9fae 100644
--- a/src/remount-fs/remount-fs.c
+++ b/src/remount-fs/remount-fs.c
@@ -29,6 +29,7 @@
#include "log.h"
#include "util.h"
#include "path-util.h"
+#include "signal-util.h"
#include "mount-setup.h"
#include "exit-status.h"
diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c
index 271247ca3f..e283d8a749 100644
--- a/src/resolve/resolved.c
+++ b/src/resolve/resolved.c
@@ -24,6 +24,7 @@
#include "mkdir.h"
#include "capability.h"
#include "selinux-util.h"
+#include "signal-util.h"
#include "resolved-manager.h"
#include "resolved-conf.h"
diff --git a/src/run/run.c b/src/run/run.c
index fcd6b06f7d..5b9f31c4aa 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -35,6 +35,7 @@
#include "calendarspec.h"
#include "ptyfwd.h"
#include "formats-util.h"
+#include "signal-util.h"
static bool arg_scope = false;
static bool arg_remain_after_exit = false;
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
index 884abdd3ea..8e72e7a36a 100644
--- a/src/shared/architecture.c
+++ b/src/shared/architecture.c
@@ -35,7 +35,7 @@ int uname_architecture(void) {
* 1:1. Instead we try to clean it up and break down the
* confusion on x86 and arm in particular.
*
- * We do not try to distuingish CPUs not CPU features, but
+ * We do not try to distinguish CPUs not CPU features, but
* actual architectures, i.e. that have genuinely different
* code. */
diff --git a/src/shared/architecture.h b/src/shared/architecture.h
index cb82418a5e..f5bbf65a90 100644
--- a/src/shared/architecture.h
+++ b/src/shared/architecture.h
@@ -27,7 +27,7 @@
/* A cleaned up architecture definition. We don't want to get lost in
* processor features, models, generations or even ABIs. Hence we
- * focus on general family, and distuignish word width and
+ * focus on general family, and distinguish word width and
* endianness. */
enum {
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index a3a2e51bb9..ef3788be68 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -37,7 +37,7 @@
#include "strv.h"
#include "random-util.h"
#include "terminal-util.h"
-
+#include "signal-util.h"
#include "ask-password-api.h"
static void backspace_chars(int ttyfd, size_t p) {
diff --git a/src/shared/capability.h b/src/shared/capability.h
index 8260ae1a81..4eb5c2a835 100644
--- a/src/shared/capability.h
+++ b/src/shared/capability.h
@@ -31,7 +31,7 @@ int have_effective_cap(int value);
int capability_bounding_set_drop(uint64_t drop, bool right_now);
int capability_bounding_set_drop_usermode(uint64_t drop);
-int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilites);
+int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities);
int drop_capability(cap_value_t cv);
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index c0b0ca4cf2..9988e5c574 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -489,7 +489,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
if (_unlikely_(!good)) {
int r;
- r = path_is_mount_point("/sys/fs/cgroup", false);
+ r = path_is_mount_point("/sys/fs/cgroup", 0);
if (r < 0)
return r;
if (r == 0)
diff --git a/src/shared/condition.c b/src/shared/condition.c
index 9f2574c2f6..24871b0dae 100644
--- a/src/shared/condition.c
+++ b/src/shared/condition.c
@@ -349,7 +349,7 @@ static int condition_test_path_is_mount_point(Condition *c) {
assert(c->parameter);
assert(c->type == CONDITION_PATH_IS_MOUNT_POINT);
- return path_is_mount_point(c->parameter, true) > 0;
+ return path_is_mount_point(c->parameter, AT_SYMLINK_FOLLOW) > 0;
}
static int condition_test_path_is_read_write(Condition *c) {
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 2c855157a9..7370c786f9 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -444,7 +444,7 @@ int config_parse_many(const char *conf_file,
if (r < 0) \
log_syntax(unit, LOG_ERR, filename, line, -r, \
"Failed to parse %s value, ignoring: %s", \
- #vartype, rvalue); \
+ #type, rvalue); \
\
return 0; \
}
diff --git a/src/shared/fdset.c b/src/shared/fdset.c
index 31849272bd..6101b628ec 100644
--- a/src/shared/fdset.c
+++ b/src/shared/fdset.c
@@ -32,7 +32,7 @@
#define MAKE_SET(s) ((Set*) s)
#define MAKE_FDSET(s) ((FDSet*) s)
-/* Make sure we can distuingish fd 0 and NULL */
+/* Make sure we can distinguish fd 0 and NULL */
#define FD_TO_PTR(fd) INT_TO_PTR((fd)+1)
#define PTR_TO_FD(p) (PTR_TO_INT(p)-1)
diff --git a/src/shared/log.c b/src/shared/log.c
index 6168a2955d..b96afc4de4 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -38,6 +38,7 @@
#include "formats-util.h"
#include "process-util.h"
#include "terminal-util.h"
+#include "signal-util.h"
#define SNDBUF_SIZE (8*1024*1024)
diff --git a/src/shared/machine-pool.c b/src/shared/machine-pool.c
index 9920d150ab..d27931cb4a 100644
--- a/src/shared/machine-pool.c
+++ b/src/shared/machine-pool.c
@@ -30,6 +30,7 @@
#include "mkdir.h"
#include "btrfs-util.h"
#include "path-util.h"
+#include "signal-util.h"
#include "machine-pool.h"
#define VAR_LIB_MACHINES_SIZE_START (1024UL*1024UL*500UL)
@@ -198,7 +199,7 @@ int setup_machine_directory(uint64_t size, sd_bus_error *error) {
return 0;
}
- if (path_is_mount_point("/var/lib/machines", true) > 0 ||
+ if (path_is_mount_point("/var/lib/machines", AT_SYMLINK_FOLLOW) > 0 ||
dir_is_empty("/var/lib/machines") == 0)
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "/var/lib/machines is not a btrfs file system. Operation is not supported on legacy file systems.");
diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index 7090989fcb..be50a1865d 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -509,7 +509,7 @@ static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id
return safe_atoi(p, mnt_id);
}
-int fd_is_mount_point(int fd) {
+int fd_is_mount_point(int fd, const char *filename, int flags) {
union file_handle_union h = FILE_HANDLE_INIT, h_parent = FILE_HANDLE_INIT;
int mount_id = -1, mount_id_parent = -1;
bool nosupp = false, check_st_dev = true;
@@ -517,6 +517,7 @@ int fd_is_mount_point(int fd) {
int r;
assert(fd >= 0);
+ assert(filename);
/* First we will try the name_to_handle_at() syscall, which
* tells us the mount id and an opaque file "handle". It is
@@ -541,7 +542,7 @@ int fd_is_mount_point(int fd) {
* subvolumes have different st_dev, even though they aren't
* real mounts of their own. */
- r = name_to_handle_at(fd, "", &h.handle, &mount_id, AT_EMPTY_PATH);
+ r = name_to_handle_at(fd, filename, &h.handle, &mount_id, flags);
if (r < 0) {
if (errno == ENOSYS)
/* This kernel does not support name_to_handle_at()
@@ -558,7 +559,7 @@ int fd_is_mount_point(int fd) {
return -errno;
}
- r = name_to_handle_at(fd, "..", &h_parent.handle, &mount_id_parent, 0);
+ r = name_to_handle_at(fd, "", &h_parent.handle, &mount_id_parent, AT_EMPTY_PATH);
if (r < 0) {
if (errno == EOPNOTSUPP) {
if (nosupp)
@@ -593,13 +594,13 @@ int fd_is_mount_point(int fd) {
return mount_id != mount_id_parent;
fallback_fdinfo:
- r = fd_fdinfo_mnt_id(fd, "", AT_EMPTY_PATH, &mount_id);
+ r = fd_fdinfo_mnt_id(fd, filename, flags, &mount_id);
if (r == -EOPNOTSUPP)
goto fallback_fstat;
if (r < 0)
return r;
- r = fd_fdinfo_mnt_id(fd, "..", 0, &mount_id_parent);
+ r = fd_fdinfo_mnt_id(fd, "", AT_EMPTY_PATH, &mount_id_parent);
if (r < 0)
return r;
@@ -615,10 +616,16 @@ fallback_fdinfo:
check_st_dev = false;
fallback_fstat:
- if (fstatat(fd, "", &a, AT_EMPTY_PATH) < 0)
+ /* yay for fstatat() taking a different set of flags than the other
+ * _at() above */
+ if (flags & AT_SYMLINK_FOLLOW)
+ flags &= ~AT_SYMLINK_FOLLOW;
+ else
+ flags |= AT_SYMLINK_NOFOLLOW;
+ if (fstatat(fd, filename, &a, flags) < 0)
return -errno;
- if (fstatat(fd, "..", &b, 0) < 0)
+ if (fstatat(fd, "", &b, AT_EMPTY_PATH) < 0)
return -errno;
/* A directory with same device and inode as its parent? Must
@@ -630,19 +637,26 @@ fallback_fstat:
return check_st_dev && (a.st_dev != b.st_dev);
}
-int path_is_mount_point(const char *t, bool allow_symlink) {
+/* flags can be AT_SYMLINK_FOLLOW or 0 */
+int path_is_mount_point(const char *t, int flags) {
_cleanup_close_ int fd = -1;
+ _cleanup_free_ char *parent = NULL;
+ int r;
assert(t);
if (path_equal(t, "/"))
return 1;
- fd = openat(AT_FDCWD, t, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|(allow_symlink ? 0 : O_PATH));
+ r = path_get_parent(t, &parent);
+ if (r < 0)
+ return r;
+
+ fd = openat(AT_FDCWD, parent, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_PATH);
if (fd < 0)
return -errno;
- return fd_is_mount_point(fd);
+ return fd_is_mount_point(fd, basename(t), flags);
}
int path_is_read_only_fs(const char *path) {
diff --git a/src/shared/path-util.h b/src/shared/path-util.h
index 4f45cfd2b7..1eac89c51b 100644
--- a/src/shared/path-util.h
+++ b/src/shared/path-util.h
@@ -53,8 +53,8 @@ char** path_strv_make_absolute_cwd(char **l);
char** path_strv_resolve(char **l, const char *prefix);
char** path_strv_resolve_uniq(char **l, const char *prefix);
-int fd_is_mount_point(int fd);
-int path_is_mount_point(const char *path, bool allow_symlink);
+int fd_is_mount_point(int fd, const char *filename, int flags);
+int path_is_mount_point(const char *path, int flags);
int path_is_read_only_fs(const char *path);
int path_is_os_tree(const char *path);
diff --git a/src/shared/process-util.c b/src/shared/process-util.c
index 92a69f50e7..cfc876567d 100644
--- a/src/shared/process-util.c
+++ b/src/shared/process-util.c
@@ -28,10 +28,11 @@
#include <signal.h>
#include <ctype.h>
-#include "process-util.h"
#include "fileio.h"
#include "util.h"
#include "log.h"
+#include "signal-util.h"
+#include "process-util.h"
int get_process_state(pid_t pid) {
const char *p;
diff --git a/src/shared/pty.c b/src/shared/pty.c
index 0f80f4863b..119d66e9a2 100644
--- a/src/shared/pty.c
+++ b/src/shared/pty.c
@@ -57,9 +57,10 @@
#include "barrier.h"
#include "macro.h"
-#include "pty.h"
#include "ring.h"
#include "util.h"
+#include "signal-util.h"
+#include "pty.h"
#define PTY_BUFSIZE 4096
diff --git a/src/shared/random-util.c b/src/shared/random-util.c
index 88f5182508..b230044f50 100644
--- a/src/shared/random-util.c
+++ b/src/shared/random-util.c
@@ -23,7 +23,9 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
+#ifdef HAVE_SYS_AUXV_H
#include <sys/auxv.h>
+#endif
#include <linux/random.h>
#include "random-util.h"
diff --git a/src/shared/rm-rf.c b/src/shared/rm-rf.c
index a89e8afc2a..bafd483be2 100644
--- a/src/shared/rm-rf.c
+++ b/src/shared/rm-rf.c
@@ -103,7 +103,7 @@ int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
}
/* Stop at mount points */
- r = fd_is_mount_point(subdir_fd);
+ r = fd_is_mount_point(fd, de->d_name, 0);
if (r < 0) {
if (ret == 0 && r != -ENOENT)
ret = r;
diff --git a/src/shared/signal-util.c b/src/shared/signal-util.c
new file mode 100644
index 0000000000..9a2973b6fd
--- /dev/null
+++ b/src/shared/signal-util.c
@@ -0,0 +1,228 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+ This file is part of systemd.
+
+ Copyright 2015 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include "util.h"
+#include "signal-util.h"
+
+int reset_all_signal_handlers(void) {
+ int sig, r = 0;
+
+ for (sig = 1; sig < _NSIG; sig++) {
+ static const struct sigaction sa = {
+ .sa_handler = SIG_DFL,
+ .sa_flags = SA_RESTART,
+ };
+
+ /* These two cannot be caught... */
+ if (sig == SIGKILL || sig == SIGSTOP)
+ continue;
+
+ /* On Linux the first two RT signals are reserved by
+ * glibc, and sigaction() will return EINVAL for them. */
+ if ((sigaction(sig, &sa, NULL) < 0))
+ if (errno != EINVAL && r == 0)
+ r = -errno;
+ }
+
+ return r;
+}
+
+int reset_signal_mask(void) {
+ sigset_t ss;
+
+ if (sigemptyset(&ss) < 0)
+ return -errno;
+
+ if (sigprocmask(SIG_SETMASK, &ss, NULL) < 0)
+ return -errno;
+
+ return 0;
+}
+
+int sigaction_many(const struct sigaction *sa, ...) {
+ va_list ap;
+ int r = 0, sig;
+
+ va_start(ap, sa);
+ while ((sig = va_arg(ap, int)) > 0)
+ if (sigaction(sig, sa, NULL) < 0)
+ r = -errno;
+ va_end(ap);
+
+ return r;
+}
+
+int ignore_signals(int sig, ...) {
+ static const struct sigaction sa = {
+ .sa_handler = SIG_IGN,
+ .sa_flags = SA_RESTART,
+ };
+ va_list ap;
+ int r = 0;
+
+ if (sigaction(sig, &sa, NULL) < 0)
+ r = -errno;
+
+ va_start(ap, sig);
+ while ((sig = va_arg(ap, int)) > 0)
+ if (sigaction(sig, &sa, NULL) < 0)
+ r = -errno;
+ va_end(ap);
+
+ return r;
+}
+
+int default_signals(int sig, ...) {
+ static const struct sigaction sa = {
+ .sa_handler = SIG_DFL,
+ .sa_flags = SA_RESTART,
+ };
+ va_list ap;
+ int r = 0;
+
+ if (sigaction(sig, &sa, NULL) < 0)
+ r = -errno;
+
+ va_start(ap, sig);
+ while ((sig = va_arg(ap, int)) > 0)
+ if (sigaction(sig, &sa, NULL) < 0)
+ r = -errno;
+ va_end(ap);
+
+ return r;
+}
+
+void sigset_add_many(sigset_t *ss, ...) {
+ va_list ap;
+ int sig;
+
+ assert(ss);
+
+ va_start(ap, ss);
+ while ((sig = va_arg(ap, int)) > 0)
+ assert_se(sigaddset(ss, sig) == 0);
+ va_end(ap);
+}
+
+int sigprocmask_many(int how, ...) {
+ va_list ap;
+ sigset_t ss;
+ int sig;
+
+ assert_se(sigemptyset(&ss) == 0);
+
+ va_start(ap, how);
+ while ((sig = va_arg(ap, int)) > 0)
+ assert_se(sigaddset(&ss, sig) == 0);
+ va_end(ap);
+
+ if (sigprocmask(how, &ss, NULL) < 0)
+ return -errno;
+
+ return 0;
+}
+
+static const char *const __signal_table[] = {
+ [SIGHUP] = "HUP",
+ [SIGINT] = "INT",
+ [SIGQUIT] = "QUIT",
+ [SIGILL] = "ILL",
+ [SIGTRAP] = "TRAP",
+ [SIGABRT] = "ABRT",
+ [SIGBUS] = "BUS",
+ [SIGFPE] = "FPE",
+ [SIGKILL] = "KILL",
+ [SIGUSR1] = "USR1",
+ [SIGSEGV] = "SEGV",
+ [SIGUSR2] = "USR2",
+ [SIGPIPE] = "PIPE",
+ [SIGALRM] = "ALRM",
+ [SIGTERM] = "TERM",
+#ifdef SIGSTKFLT
+ [SIGSTKFLT] = "STKFLT", /* Linux on SPARC doesn't know SIGSTKFLT */
+#endif
+ [SIGCHLD] = "CHLD",
+ [SIGCONT] = "CONT",
+ [SIGSTOP] = "STOP",
+ [SIGTSTP] = "TSTP",
+ [SIGTTIN] = "TTIN",
+ [SIGTTOU] = "TTOU",
+ [SIGURG] = "URG",
+ [SIGXCPU] = "XCPU",
+ [SIGXFSZ] = "XFSZ",
+ [SIGVTALRM] = "VTALRM",
+ [SIGPROF] = "PROF",
+ [SIGWINCH] = "WINCH",
+ [SIGIO] = "IO",
+ [SIGPWR] = "PWR",
+ [SIGSYS] = "SYS"
+};
+
+DEFINE_PRIVATE_STRING_TABLE_LOOKUP(__signal, int);
+
+const char *signal_to_string(int signo) {
+ static thread_local char buf[sizeof("RTMIN+")-1 + DECIMAL_STR_MAX(int) + 1];
+ const char *name;
+
+ name = __signal_to_string(signo);
+ if (name)
+ return name;
+
+ if (signo >= SIGRTMIN && signo <= SIGRTMAX)
+ snprintf(buf, sizeof(buf), "RTMIN+%d", signo - SIGRTMIN);
+ else
+ snprintf(buf, sizeof(buf), "%d", signo);
+
+ return buf;
+}
+
+int signal_from_string(const char *s) {
+ int signo;
+ int offset = 0;
+ unsigned u;
+
+ signo = __signal_from_string(s);
+ if (signo > 0)
+ return signo;
+
+ if (startswith(s, "RTMIN+")) {
+ s += 6;
+ offset = SIGRTMIN;
+ }
+ if (safe_atou(s, &u) >= 0) {
+ signo = (int) u + offset;
+ if (signo > 0 && signo < _NSIG)
+ return signo;
+ }
+ return -EINVAL;
+}
+
+int signal_from_string_try_harder(const char *s) {
+ int signo;
+ assert(s);
+
+ signo = signal_from_string(s);
+ if (signo <= 0)
+ if (startswith(s, "SIG"))
+ return signal_from_string(s+3);
+
+ return signo;
+}
diff --git a/src/shared/signal-util.h b/src/shared/signal-util.h
new file mode 100644
index 0000000000..ddf64cda76
--- /dev/null
+++ b/src/shared/signal-util.h
@@ -0,0 +1,41 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+ This file is part of systemd.
+
+ Copyright 2010-2015 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <signal.h>
+
+#include "macro.h"
+
+int reset_all_signal_handlers(void);
+int reset_signal_mask(void);
+
+int ignore_signals(int sig, ...);
+int default_signals(int sig, ...);
+int sigaction_many(const struct sigaction *sa, ...);
+
+void sigset_add_many(sigset_t *ss, ...);
+int sigprocmask_many(int how, ...);
+
+const char *signal_to_string(int i) _const_;
+int signal_from_string(const char *s) _pure_;
+
+int signal_from_string_try_harder(const char *s);
diff --git a/src/shared/util.c b/src/shared/util.c
index 34024bacc4..8a6107969a 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -93,6 +93,7 @@
#include "random-util.h"
#include "terminal-util.h"
#include "hostname-util.h"
+#include "signal-util.h"
/* Put this test here for a lack of better place */
assert_cc(EAGAIN == EWOULDBLOCK);
@@ -771,41 +772,6 @@ int readlink_and_canonicalize(const char *p, char **r) {
return 0;
}
-int reset_all_signal_handlers(void) {
- int sig, r = 0;
-
- for (sig = 1; sig < _NSIG; sig++) {
- struct sigaction sa = {
- .sa_handler = SIG_DFL,
- .sa_flags = SA_RESTART,
- };
-
- /* These two cannot be caught... */
- if (sig == SIGKILL || sig == SIGSTOP)
- continue;
-
- /* On Linux the first two RT signals are reserved by
- * glibc, and sigaction() will return EINVAL for them. */
- if ((sigaction(sig, &sa, NULL) < 0))
- if (errno != EINVAL && r == 0)
- r = -errno;
- }
-
- return r;
-}
-
-int reset_signal_mask(void) {
- sigset_t ss;
-
- if (sigemptyset(&ss) < 0)
- return -errno;
-
- if (sigprocmask(SIG_SETMASK, &ss, NULL) < 0)
- return -errno;
-
- return 0;
-}
-
char *strstrip(char *s) {
char *e;
@@ -1561,59 +1527,6 @@ int flush_fd(int fd) {
}
}
-int sigaction_many(const struct sigaction *sa, ...) {
- va_list ap;
- int r = 0, sig;
-
- va_start(ap, sa);
- while ((sig = va_arg(ap, int)) > 0)
- if (sigaction(sig, sa, NULL) < 0)
- r = -errno;
- va_end(ap);
-
- return r;
-}
-
-int ignore_signals(int sig, ...) {
- struct sigaction sa = {
- .sa_handler = SIG_IGN,
- .sa_flags = SA_RESTART,
- };
- va_list ap;
- int r = 0;
-
- if (sigaction(sig, &sa, NULL) < 0)
- r = -errno;
-
- va_start(ap, sig);
- while ((sig = va_arg(ap, int)) > 0)
- if (sigaction(sig, &sa, NULL) < 0)
- r = -errno;
- va_end(ap);
-
- return r;
-}
-
-int default_signals(int sig, ...) {
- struct sigaction sa = {
- .sa_handler = SIG_DFL,
- .sa_flags = SA_RESTART,
- };
- va_list ap;
- int r = 0;
-
- if (sigaction(sig, &sa, NULL) < 0)
- r = -errno;
-
- va_start(ap, sig);
- while ((sig = va_arg(ap, int)) > 0)
- if (sigaction(sig, &sa, NULL) < 0)
- r = -errno;
- va_end(ap);
-
- return r;
-}
-
void safe_close_pair(int p[]) {
assert(p);
@@ -1927,35 +1840,6 @@ void rename_process(const char name[8]) {
}
}
-void sigset_add_many(sigset_t *ss, ...) {
- va_list ap;
- int sig;
-
- assert(ss);
-
- va_start(ap, ss);
- while ((sig = va_arg(ap, int)) > 0)
- assert_se(sigaddset(ss, sig) == 0);
- va_end(ap);
-}
-
-int sigprocmask_many(int how, ...) {
- va_list ap;
- sigset_t ss;
- int sig;
-
- assert_se(sigemptyset(&ss) == 0);
-
- va_start(ap, how);
- while ((sig = va_arg(ap, int)) > 0)
- assert_se(sigaddset(&ss, sig) == 0);
- va_end(ap);
-
- if (sigprocmask(how, &ss, NULL) < 0)
- return -errno;
-
- return 0;
-}
char *lookup_uid(uid_t uid) {
long bufsize;
char *name;
@@ -2344,18 +2228,6 @@ DIR *xopendirat(int fd, const char *name, int flags) {
return d;
}
-int signal_from_string_try_harder(const char *s) {
- int signo;
- assert(s);
-
- signo = signal_from_string(s);
- if (signo <= 0)
- if (startswith(s, "SIG"))
- return signal_from_string(s+3);
-
- return signo;
-}
-
static char *tag_to_udev_node(const char *tagvalue, const char *by) {
_cleanup_free_ char *t = NULL, *u = NULL;
size_t enc_len;
@@ -3312,81 +3184,6 @@ static const char* const ip_tos_table[] = {
DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ip_tos, int, 0xff);
-static const char *const __signal_table[] = {
- [SIGHUP] = "HUP",
- [SIGINT] = "INT",
- [SIGQUIT] = "QUIT",
- [SIGILL] = "ILL",
- [SIGTRAP] = "TRAP",
- [SIGABRT] = "ABRT",
- [SIGBUS] = "BUS",
- [SIGFPE] = "FPE",
- [SIGKILL] = "KILL",
- [SIGUSR1] = "USR1",
- [SIGSEGV] = "SEGV",
- [SIGUSR2] = "USR2",
- [SIGPIPE] = "PIPE",
- [SIGALRM] = "ALRM",
- [SIGTERM] = "TERM",
-#ifdef SIGSTKFLT
- [SIGSTKFLT] = "STKFLT", /* Linux on SPARC doesn't know SIGSTKFLT */
-#endif
- [SIGCHLD] = "CHLD",
- [SIGCONT] = "CONT",
- [SIGSTOP] = "STOP",
- [SIGTSTP] = "TSTP",
- [SIGTTIN] = "TTIN",
- [SIGTTOU] = "TTOU",
- [SIGURG] = "URG",
- [SIGXCPU] = "XCPU",
- [SIGXFSZ] = "XFSZ",
- [SIGVTALRM] = "VTALRM",
- [SIGPROF] = "PROF",
- [SIGWINCH] = "WINCH",
- [SIGIO] = "IO",
- [SIGPWR] = "PWR",
- [SIGSYS] = "SYS"
-};
-
-DEFINE_PRIVATE_STRING_TABLE_LOOKUP(__signal, int);
-
-const char *signal_to_string(int signo) {
- static thread_local char buf[sizeof("RTMIN+")-1 + DECIMAL_STR_MAX(int) + 1];
- const char *name;
-
- name = __signal_to_string(signo);
- if (name)
- return name;
-
- if (signo >= SIGRTMIN && signo <= SIGRTMAX)
- snprintf(buf, sizeof(buf), "RTMIN+%d", signo - SIGRTMIN);
- else
- snprintf(buf, sizeof(buf), "%d", signo);
-
- return buf;
-}
-
-int signal_from_string(const char *s) {
- int signo;
- int offset = 0;
- unsigned u;
-
- signo = __signal_from_string(s);
- if (signo > 0)
- return signo;
-
- if (startswith(s, "RTMIN+")) {
- s += 6;
- offset = SIGRTMIN;
- }
- if (safe_atou(s, &u) >= 0) {
- signo = (int) u + offset;
- if (signo > 0 && signo < _NSIG)
- return signo;
- }
- return -EINVAL;
-}
-
bool kexec_loaded(void) {
bool loaded = false;
char *s;
@@ -5887,7 +5684,7 @@ int same_fd(int a, int b) {
/* The fds refer to the same inode on disk, let's also check
* if they have the same fd flags. This is useful to
- * distuingish the read and write side of a pipe created with
+ * distinguish the read and write side of a pipe created with
* pipe(). */
fa = fcntl(a, F_GETFL);
if (fa < 0)
diff --git a/src/shared/util.h b/src/shared/util.h
index eb3595250d..467ae234a0 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -29,7 +29,6 @@
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
-#include <signal.h>
#include <sched.h>
#include <limits.h>
#include <sys/types.h>
@@ -227,9 +226,6 @@ int readlink_value(const char *p, char **ret);
int readlink_and_make_absolute(const char *p, char **r);
int readlink_and_canonicalize(const char *p, char **r);
-int reset_all_signal_handlers(void);
-int reset_signal_mask(void);
-
char *strstrip(char *s);
char *delete_chars(char *s, const char *bad);
char *truncate_nl(char *s);
@@ -334,10 +330,6 @@ bool fstype_is_network(const char *fstype);
int flush_fd(int fd);
-int ignore_signals(int sig, ...);
-int default_signals(int sig, ...);
-int sigaction_many(const struct sigaction *sa, ...);
-
int fopen_temporary(const char *path, FILE **_f, char **_temp_path);
ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll);
@@ -349,9 +341,6 @@ bool is_device_path(const char *path);
int dir_is_empty(const char *path);
char* dirname_malloc(const char *path);
-void sigset_add_many(sigset_t *ss, ...);
-int sigprocmask_many(int how, ...);
-
char* lookup_uid(uid_t uid);
char* getlogname_malloc(void);
char* getusername_malloc(void);
@@ -465,11 +454,6 @@ int rlimit_from_string(const char *s) _pure_;
int ip_tos_to_string_alloc(int i, char **s);
int ip_tos_from_string(const char *s);
-const char *signal_to_string(int i) _const_;
-int signal_from_string(const char *s) _pure_;
-
-int signal_from_string_try_harder(const char *s);
-
extern int saved_argc;
extern char **saved_argv;
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index f8e10a4710..a7b8e54a9c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -72,6 +72,7 @@
#include "process-util.h"
#include "terminal-util.h"
#include "hostname-util.h"
+#include "signal-util.h"
static char **arg_types = NULL;
static char **arg_states = NULL;
@@ -5098,7 +5099,7 @@ static int import_environment(sd_bus *bus, char **args) {
static int enable_sysv_units(const char *verb, char **args) {
int r = 0;
-#if defined(HAVE_SYSV_COMPAT) && defined(HAVE_CHKCONFIG)
+#if defined(HAVE_SYSV_COMPAT)
unsigned f = 0;
_cleanup_lookup_paths_free_ LookupPaths paths = {};
@@ -5123,7 +5124,7 @@ static int enable_sysv_units(const char *verb, char **args) {
_cleanup_free_ char *p = NULL, *q = NULL, *l = NULL;
bool found_native = false, found_sysv;
unsigned c = 1;
- const char *argv[6] = { "/sbin/chkconfig", NULL, NULL, NULL, NULL };
+ const char *argv[6] = { ROOTLIBEXECDIR "/systemd-sysv-install", NULL, NULL, NULL, NULL };
char **k;
int j;
pid_t pid;
@@ -5149,7 +5150,10 @@ static int enable_sysv_units(const char *verb, char **args) {
break;
}
- if (found_native)
+ /* If we have both a native unit and a SysV script,
+ * enable/disable them both (below); for is-enabled, prefer the
+ * native unit */
+ if (found_native && streq(verb, "is-enabled"))
continue;
p = path_join(arg_root, SYSTEM_SYSVINIT_PATH, name);
@@ -5161,15 +5165,16 @@ static int enable_sysv_units(const char *verb, char **args) {
if (!found_sysv)
continue;
- log_info("%s is not a native service, redirecting to /sbin/chkconfig.", name);
+ if (found_native)
+ log_info("Synchronizing state of %s with SysV init with %s...", name, argv[0]);
+ else
+ log_info("%s is not a native service, redirecting to systemd-sysv-install", name);
if (!isempty(arg_root))
argv[c++] = q = strappend("--root=", arg_root);
+ argv[c++] = verb;
argv[c++] = basename(p);
- argv[c++] =
- streq(verb, "enable") ? "on" :
- streq(verb, "disable") ? "off" : "--level=5";
argv[c] = NULL;
l = strv_join((char**)argv, " ");
@@ -5185,6 +5190,7 @@ static int enable_sysv_units(const char *verb, char **args) {
/* Child */
execv(argv[0], (char**) argv);
+ log_error("Failed to execute %s: %m", argv[0]);
_exit(EXIT_FAILURE);
}
@@ -5210,6 +5216,9 @@ static int enable_sysv_units(const char *verb, char **args) {
} else
return -EPROTO;
+ if (found_native)
+ continue;
+
/* Remove this entry, so that we don't try enabling it as native unit */
assert(f > 0);
f--;
diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
new file mode 100755
index 0000000000..a53a3e6221
--- /dev/null
+++ b/src/systemctl/systemd-sysv-install.SKELETON
@@ -0,0 +1,47 @@
+#!/bin/sh
+# This script is called by "systemctl enable/disable" when the given unit is a
+# SysV init.d script. It needs to call the distribution's mechanism for
+# enabling/disabling those, such as chkconfig, update-rc.d, or similar. This
+# can optionally take a --root argument for enabling a SysV init script
+# in a chroot or similar.
+set -e
+
+usage() {
+ echo "Usage: $0 [--root=path] enable|disable|is-enabled <sysv script name>" >&2
+ exit 1
+}
+
+# parse options
+eval set -- "$(getopt -o r: --long root: -- "$@")"
+while true; do
+ case "$1" in
+ -r|--root)
+ ROOT="$2"
+ shift 2 ;;
+ --) shift ; break ;;
+ *) usage ;;
+ esac
+done
+
+NAME="$2"
+[ -n "$NAME" ] || usage
+
+case "$1" in
+ enable)
+ # call the command to enable SysV init script $NAME here
+ # (consider optional $ROOT)
+ echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
+ ;;
+ disable)
+ # call the command to disable SysV init script $NAME here
+ # (consider optional $ROOT)
+ echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
+ ;;
+ is-enabled)
+ # exit with 0 if $NAME is enabled, non-zero if it is disabled
+ # (consider optional $ROOT)
+ echo "IMPLEMENT ME: checking SysV init.d script $NAME"
+ ;;
+ *)
+ usage ;;
+esac
diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
new file mode 100644
index 0000000000..463906d304
--- /dev/null
+++ b/src/test/test-conf-parser.c
@@ -0,0 +1,234 @@
+/***
+ This file is part of systemd.
+
+ Copyright 2015 Ronny Chevalier
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include "conf-parser.h"
+#include "macro.h"
+#include "util.h"
+#include "strv.h"
+#include "log.h"
+
+static void test_config_parse_path_one(const char *rvalue, const char *expected) {
+ char *path = NULL;
+
+ assert_se(config_parse_path("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &path, NULL) >= 0);
+ assert_se(streq_ptr(expected, path));
+
+ free(path);
+}
+
+static void test_config_parse_log_level_one(const char *rvalue, int expected) {
+ int log_level = 0;
+
+ assert_se(config_parse_log_level("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &log_level, NULL) >= 0);
+ assert_se(expected == log_level);
+}
+
+static void test_config_parse_log_facility_one(const char *rvalue, int expected) {
+ int log_facility = 0;
+
+ assert_se(config_parse_log_facility("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &log_facility, NULL) >= 0);
+ assert_se(expected == log_facility);
+}
+
+static void test_config_parse_iec_size_one(const char *rvalue, size_t expected) {
+ size_t iec_size = 0;
+
+ assert_se(config_parse_iec_size("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &iec_size, NULL) >= 0);
+ assert_se(expected == iec_size);
+}
+
+static void test_config_parse_si_size_one(const char *rvalue, size_t expected) {
+ size_t si_size = 0;
+
+ assert_se(config_parse_si_size("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &si_size, NULL) >= 0);
+ assert_se(expected == si_size);
+}
+
+static void test_config_parse_int_one(const char *rvalue, int expected) {
+ int v = -1;
+
+ assert_se(config_parse_int("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &v, NULL) >= 0);
+ assert_se(expected == v);
+}
+
+static void test_config_parse_unsigned_one(const char *rvalue, unsigned expected) {
+ unsigned v = 0;
+
+ assert_se(config_parse_unsigned("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &v, NULL) >= 0);
+ assert_se(expected == v);
+}
+
+static void test_config_parse_strv_one(const char *rvalue, char **expected) {
+ char **strv = 0;
+
+ assert_se(config_parse_strv("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &strv, NULL) >= 0);
+ assert_se(strv_equal(expected, strv));
+
+ strv_free(strv);
+}
+
+static void test_config_parse_mode_one(const char *rvalue, mode_t expected) {
+ mode_t v = 0;
+
+ assert_se(config_parse_mode("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &v, NULL) >= 0);
+ assert_se(expected == v);
+}
+
+static void test_config_parse_sec_one(const char *rvalue, usec_t expected) {
+ usec_t v = 0;
+
+ assert_se(config_parse_sec("unit", "filename", 1, "section", 1, "lvalue", 0, rvalue, &v, NULL) >= 0);
+ assert_se(expected == v);
+}
+
+static void test_config_parse_nsec_one(const char *rvalue, nsec_t expected) {
+ nsec_t v = 0;
+
+ assert_se(config_parse_nsec("unit", "filename", 1, "nsection", 1, "lvalue", 0, rvalue, &v, NULL) >= 0);
+ assert_se(expected == v);
+}
+
+static void test_config_parse_path(void) {
+ test_config_parse_path_one("/path", "/path");
+ test_config_parse_path_one("/path//////////", "/path");
+ test_config_parse_path_one("///path/foo///bar////bar//", "/path/foo/bar/bar");
+
+ test_config_parse_path_one("not_absolute/path", NULL);
+}
+
+static void test_config_parse_log_level(void) {
+ test_config_parse_log_level_one("debug", LOG_DEBUG);
+ test_config_parse_log_level_one("info", LOG_INFO);
+
+ test_config_parse_log_level_one("garbage", 0);
+}
+
+static void test_config_parse_log_facility(void) {
+ test_config_parse_log_facility_one("mail", LOG_MAIL);
+ test_config_parse_log_facility_one("user", LOG_USER);
+
+ test_config_parse_log_facility_one("garbage", 0);
+}
+
+static void test_config_parse_iec_size(void) {
+ test_config_parse_iec_size_one("1024", 1024);
+ test_config_parse_iec_size_one("2K", 2048);
+ test_config_parse_iec_size_one("10M", 10 * 1024 * 1024);
+ test_config_parse_iec_size_one("1G", 1 * 1024 * 1024 * 1024);
+ test_config_parse_iec_size_one("0G", 0);
+ test_config_parse_iec_size_one("0", 0);
+
+ test_config_parse_iec_size_one("-982", 0);
+ test_config_parse_iec_size_one("49874444198739873000000G", 0);
+ test_config_parse_iec_size_one("garbage", 0);
+}
+
+static void test_config_parse_si_size(void) {
+ test_config_parse_si_size_one("1024", 1024);
+ test_config_parse_si_size_one("2K", 2000);
+ test_config_parse_si_size_one("10M", 10 * 1000 * 1000);
+ test_config_parse_si_size_one("1G", 1 * 1000 * 1000 * 1000);
+ test_config_parse_si_size_one("0G", 0);
+ test_config_parse_si_size_one("0", 0);
+
+ test_config_parse_si_size_one("-982", 0);
+ test_config_parse_si_size_one("49874444198739873000000G", 0);
+ test_config_parse_si_size_one("garbage", 0);
+}
+
+static void test_config_parse_int(void) {
+ test_config_parse_int_one("1024", 1024);
+ test_config_parse_int_one("-1024", -1024);
+ test_config_parse_int_one("0", 0);
+
+ test_config_parse_int_one("99999999999999999999999999999999999999999999999999999999", -1);
+ test_config_parse_int_one("-99999999999999999999999999999999999999999999999999999999", -1);
+ test_config_parse_int_one("1G", -1);
+ test_config_parse_int_one("garbage", -1);
+}
+
+static void test_config_parse_unsigned(void) {
+ test_config_parse_unsigned_one("10241024", 10241024);
+ test_config_parse_unsigned_one("1024", 1024);
+ test_config_parse_unsigned_one("0", 0);
+
+ test_config_parse_unsigned_one("99999999999999999999999999999999999999999999999999999999", 0);
+ test_config_parse_unsigned_one("1G", 0);
+ test_config_parse_unsigned_one("garbage", 0);
+ test_config_parse_unsigned_one("1000garbage", 0);
+}
+
+static void test_config_parse_strv(void) {
+ test_config_parse_strv_one("", STRV_MAKE_EMPTY);
+ test_config_parse_strv_one("foo", STRV_MAKE("foo"));
+ test_config_parse_strv_one("foo bar foo", STRV_MAKE("foo", "bar", "foo"));
+ test_config_parse_strv_one("\"foo bar\" foo", STRV_MAKE("foo bar", "foo"));
+}
+
+static void test_config_parse_mode(void) {
+ test_config_parse_mode_one("777", 0777);
+ test_config_parse_mode_one("644", 0644);
+
+ test_config_parse_mode_one("-777", 0);
+ test_config_parse_mode_one("999", 0);
+ test_config_parse_mode_one("garbage", 0);
+ test_config_parse_mode_one("777garbage", 0);
+ test_config_parse_mode_one("777 garbage", 0);
+}
+
+static void test_config_parse_sec(void) {
+ test_config_parse_sec_one("1", 1 * USEC_PER_SEC);
+ test_config_parse_sec_one("1s", 1 * USEC_PER_SEC);
+ test_config_parse_sec_one("100ms", 100 * USEC_PER_MSEC);
+ test_config_parse_sec_one("5min 20s", 5 * 60 * USEC_PER_SEC + 20 * USEC_PER_SEC);
+
+ test_config_parse_sec_one("-1", 0);
+ test_config_parse_sec_one("10foo", 0);
+ test_config_parse_sec_one("garbage", 0);
+}
+
+static void test_config_parse_nsec(void) {
+ test_config_parse_nsec_one("1", 1);
+ test_config_parse_nsec_one("1s", 1 * NSEC_PER_SEC);
+ test_config_parse_nsec_one("100ms", 100 * NSEC_PER_MSEC);
+ test_config_parse_nsec_one("5min 20s", 5 * 60 * NSEC_PER_SEC + 20 * NSEC_PER_SEC);
+
+ test_config_parse_nsec_one("-1", 0);
+ test_config_parse_nsec_one("10foo", 0);
+ test_config_parse_nsec_one("garbage", 0);
+}
+
+int main(int argc, char **argv) {
+ log_parse_environment();
+ log_open();
+
+ test_config_parse_path();
+ test_config_parse_log_level();
+ test_config_parse_log_facility();
+ test_config_parse_iec_size();
+ test_config_parse_si_size();
+ test_config_parse_int();
+ test_config_parse_unsigned();
+ test_config_parse_strv();
+ test_config_parse_mode();
+ test_config_parse_sec();
+ test_config_parse_nsec();
+
+ return 0;
+}
diff --git a/src/test/test-fdset.c b/src/test/test-fdset.c
index 91df7eb663..242c5d9dc2 100644
--- a/src/test/test-fdset.c
+++ b/src/test/test-fdset.c
@@ -154,6 +154,56 @@ static void test_fdset_iterate(void) {
unlink(name);
}
+static void test_fdset_isempty(void) {
+ int fd;
+ _cleanup_fdset_free_ FDSet *fdset = NULL;
+ char name[] = "/tmp/test-fdset_isempty.XXXXXX";
+
+ fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
+ assert_se(fd >= 0);
+
+ fdset = fdset_new();
+ assert_se(fdset);
+
+ assert_se(fdset_isempty(fdset));
+ assert_se(fdset_put(fdset, fd) >= 0);
+ assert_se(!fdset_isempty(fdset));
+
+ unlink(name);
+}
+
+static void test_fdset_steal_first(void) {
+ int fd;
+ _cleanup_fdset_free_ FDSet *fdset = NULL;
+ char name[] = "/tmp/test-fdset_steal_first.XXXXXX";
+
+ fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
+ assert_se(fd >= 0);
+
+ fdset = fdset_new();
+ assert_se(fdset);
+
+ assert_se(fdset_steal_first(fdset) < 0);
+ assert_se(fdset_put(fdset, fd) >= 0);
+ assert_se(fdset_steal_first(fdset) == fd);
+ assert_se(fdset_steal_first(fdset) < 0);
+ assert_se(fdset_put(fdset, fd) >= 0);
+
+ unlink(name);
+}
+
+static void test_fdset_new_array(void) {
+ int fds[] = {10, 11, 12, 13};
+ _cleanup_fdset_free_ FDSet *fdset = NULL;
+
+ assert_se(fdset_new_array(&fdset, fds, 4) >= 0);
+ assert_se(fdset_size(fdset) == 4);
+ assert_se(fdset_contains(fdset, 10));
+ assert_se(fdset_contains(fdset, 11));
+ assert_se(fdset_contains(fdset, 12));
+ assert_se(fdset_contains(fdset, 13));
+}
+
int main(int argc, char *argv[]) {
test_fdset_new_fill();
test_fdset_put_dup();
@@ -161,6 +211,9 @@ int main(int argc, char *argv[]) {
test_fdset_close_others();
test_fdset_remove();
test_fdset_iterate();
+ test_fdset_isempty();
+ test_fdset_steal_first();
+ test_fdset_new_array();
return 0;
}
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index 09f0f2f89e..0045ae6824 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <unistd.h>
+#include <sys/mount.h>
#include "path-util.h"
#include "util.h"
@@ -88,21 +89,9 @@ static void test_path(void) {
test_parent("/aa///file...", "/aa///");
test_parent("file.../", NULL);
- assert_se(path_is_mount_point("/", true) > 0);
- assert_se(path_is_mount_point("/", false) > 0);
-
fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
assert_se(fd >= 0);
- assert_se(fd_is_mount_point(fd) > 0);
-
- assert_se(path_is_mount_point("/proc", true) > 0);
- assert_se(path_is_mount_point("/proc", false) > 0);
-
- assert_se(path_is_mount_point("/proc/1", true) == 0);
- assert_se(path_is_mount_point("/proc/1", false) == 0);
-
- assert_se(path_is_mount_point("/sys", true) > 0);
- assert_se(path_is_mount_point("/sys", false) > 0);
+ assert_se(fd_is_mount_point(fd, "/", 0) > 0);
{
char p1[] = "aaa/bbb////ccc";
@@ -322,6 +311,66 @@ static void test_prefix_root(void) {
test_prefix_root_one("/foo///", "//bar", "/foo/bar");
}
+static void test_path_is_mount_point(void) {
+ int fd, rt, rf, rlt, rlf;
+ char tmp_dir[] = "/tmp/test-path-is-mount-point-XXXXXX";
+ _cleanup_free_ char *file1 = NULL, *file2 = NULL, *link1 = NULL, *link2 = NULL;
+
+ assert_se(path_is_mount_point("/", AT_SYMLINK_FOLLOW) > 0);
+ assert_se(path_is_mount_point("/", 0) > 0);
+
+ assert_se(path_is_mount_point("/proc", AT_SYMLINK_FOLLOW) > 0);
+ assert_se(path_is_mount_point("/proc", 0) > 0);
+
+ assert_se(path_is_mount_point("/proc/1", AT_SYMLINK_FOLLOW) == 0);
+ assert_se(path_is_mount_point("/proc/1", 0) == 0);
+
+ assert_se(path_is_mount_point("/sys", AT_SYMLINK_FOLLOW) > 0);
+ assert_se(path_is_mount_point("/sys", 0) > 0);
+
+ /* file mountpoints */
+ assert_se(mkdtemp(tmp_dir) != NULL);
+ file1 = path_join(NULL, tmp_dir, "file1");
+ assert_se(file1);
+ file2 = path_join(NULL, tmp_dir, "file2");
+ assert_se(file2);
+ fd = open(file1, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664);
+ assert_se(fd > 0);
+ close(fd);
+ fd = open(file2, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664);
+ assert_se(fd > 0);
+ close(fd);
+ link1 = path_join(NULL, tmp_dir, "link1");
+ assert_se(link1);
+ assert_se(symlink("file1", link1) == 0);
+ link2 = path_join(NULL, tmp_dir, "link2");
+ assert_se(link1);
+ assert_se(symlink("file2", link2) == 0);
+
+ assert_se(path_is_mount_point(file1, AT_SYMLINK_FOLLOW) == 0);
+ assert_se(path_is_mount_point(file1, 0) == 0);
+ assert_se(path_is_mount_point(link1, AT_SYMLINK_FOLLOW) == 0);
+ assert_se(path_is_mount_point(link1, 0) == 0);
+
+ /* this test will only work as root */
+ if (mount(file1, file2, NULL, MS_BIND, NULL) >= 0) {
+ rf = path_is_mount_point(file2, 0);
+ rt = path_is_mount_point(file2, AT_SYMLINK_FOLLOW);
+ rlf = path_is_mount_point(link2, 0);
+ rlt = path_is_mount_point(link2, AT_SYMLINK_FOLLOW);
+
+ assert_se(umount(file2) == 0);
+
+ assert_se(rf == 1);
+ assert_se(rt == 1);
+ assert_se(rlf == 0);
+ assert_se(rlt == 1);
+ } else
+ printf("Skipping bind mount file test: %m\n");
+
+ assert_se(rm_rf(tmp_dir, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
+}
+
int main(int argc, char **argv) {
test_path();
test_find_binary(argv[0], true);
@@ -333,6 +382,7 @@ int main(int argc, char **argv) {
test_strv_resolve();
test_path_startswith();
test_prefix_root();
+ test_path_is_mount_point();
return 0;
}
diff --git a/src/test/test-pty.c b/src/test/test-pty.c
index b5f4d4f094..f8807c9150 100644
--- a/src/test/test-pty.c
+++ b/src/test/test-pty.c
@@ -27,6 +27,7 @@
#include "pty.h"
#include "util.h"
+#include "signal-util.h"
static const char sndmsg[] = "message\n";
static const char rcvmsg[] = "message\r\n";
diff --git a/src/test/test-udev.c b/src/test/test-udev.c
index 23b7faa939..f3953fe26a 100644
--- a/src/test/test-udev.c
+++ b/src/test/test-udev.c
@@ -120,11 +120,6 @@ int main(int argc, char *argv[]) {
sigfillset(&mask);
sigprocmask(SIG_SETMASK, &mask, &sigmask_orig);
- event->fd_signal = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
- if (event->fd_signal < 0) {
- fprintf(stderr, "error creating signalfd\n");
- goto out;
- }
/* do what devtmpfs usually provides us */
if (udev_device_get_devnode(dev) != NULL) {
@@ -153,8 +148,6 @@ int main(int argc, char *argv[]) {
3 * USEC_PER_SEC, USEC_PER_SEC,
NULL);
out:
- if (event != NULL && event->fd_signal >= 0)
- close(event->fd_signal);
mac_selinux_finish();
return err ? EXIT_FAILURE : EXIT_SUCCESS;
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index a9711ac9f5..31b12d50d7 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -225,6 +225,15 @@ static void test_config_parse_exec(void) {
check_execcommand(c1,
"/sbin/find", NULL, ";", "x", false);
+ log_info("/* encoded semicolon */");
+ r = config_parse_exec(NULL, "fake", 5, "section", 1,
+ "LValue", 0,
+ "/bin/find \\073",
+ &c, NULL);
+ assert_se(r >= 0);
+ c1 = c1->command_next;
+ check_execcommand(c1, "/bin/find", NULL, "\\073", NULL, false);
+
log_info("/* spaces in the filename */");
r = config_parse_exec(NULL, "fake", 5, "section", 1,
"LValue", 0,
@@ -296,6 +305,16 @@ static void test_config_parse_exec(void) {
c1 = c1->command_next;
check_execcommand(c1, "/path ", NULL, NULL, NULL, false);
+ log_info("/* quoted backslashes */");
+ r = config_parse_exec(NULL, "fake", 5, "section", 1,
+ "LValue", 0,
+ "/bin/grep '\\w+\\K'",
+ &c, NULL);
+ assert_se(r >= 0);
+ c1 = c1->command_next;
+ check_execcommand(c1, "/bin/grep", NULL, "\\w+\\K", NULL, false);
+
+
log_info("/* trailing backslash: \\ */");
/* backslash is invalid */
r = config_parse_exec(NULL, "fake", 4, "section", 1,
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 41cbe81b3d..e0269821d7 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -39,6 +39,7 @@
#include "virt.h"
#include "process-util.h"
#include "hostname-util.h"
+#include "signal-util.h"
static void test_streq_ptr(void) {
assert_se(streq_ptr(NULL, NULL));
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 735668bede..d69129ee03 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -24,6 +24,7 @@
#include "capability.h"
#include "clock-util.h"
#include "network-util.h"
+#include "signal-util.h"
#include "timesyncd-manager.h"
#include "timesyncd-conf.h"
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index c440170f95..97251ef0aa 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -44,6 +44,7 @@
#include "def.h"
#include "process-util.h"
#include "terminal-util.h"
+#include "signal-util.h"
static enum {
ACTION_LIST,
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 2fa26a40be..a5c3edbff8 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -30,9 +30,19 @@
#include <sys/wait.h>
#include <sys/signalfd.h>
-#include "udev.h"
#include "rtnl-util.h"
+#include "event-util.h"
#include "formats-util.h"
+#include "process-util.h"
+#include "signal-util.h"
+#include "udev.h"
+
+typedef struct Spawn {
+ const char *cmd;
+ pid_t pid;
+ usec_t timeout_warn;
+ usec_t timeout;
+} Spawn;
struct udev_event *udev_event_new(struct udev_device *dev) {
struct udev *udev = udev_device_get_udev(dev);
@@ -45,8 +55,7 @@ struct udev_event *udev_event_new(struct udev_device *dev) {
event->udev = udev;
udev_list_init(udev, &event->run_list, false);
udev_list_init(udev, &event->seclabel_list, false);
- event->fd_signal = -1;
- event->birth_usec = now(CLOCK_MONOTONIC);
+ event->birth_usec = clock_boottime_or_monotonic();
return event;
}
@@ -467,7 +476,7 @@ static void spawn_read(struct udev_event *event,
if (timeout_usec > 0) {
usec_t age_usec;
- age_usec = now(CLOCK_MONOTONIC) - event->birth_usec;
+ age_usec = clock_boottime_or_monotonic() - event->birth_usec;
if (age_usec >= timeout_usec) {
log_error("timeout '%s'", cmd);
return;
@@ -540,102 +549,116 @@ static void spawn_read(struct udev_event *event,
result[respos] = '\0';
}
+static int on_spawn_timeout(sd_event_source *s, uint64_t usec, void *userdata) {
+ Spawn *spawn = userdata;
+ char timeout[FORMAT_TIMESTAMP_RELATIVE_MAX];
+
+ assert(spawn);
+
+ kill_and_sigcont(spawn->pid, SIGKILL);
+
+ log_error("spawned process '%s' ["PID_FMT"] timed out after %s, killing", spawn->cmd, spawn->pid,
+ format_timestamp_relative(timeout, sizeof(timeout), spawn->timeout));
+
+ return 1;
+}
+
+static int on_spawn_timeout_warning(sd_event_source *s, uint64_t usec, void *userdata) {
+ Spawn *spawn = userdata;
+ char timeout[FORMAT_TIMESTAMP_RELATIVE_MAX];
+
+ assert(spawn);
+
+ log_warning("spawned process '%s' ["PID_FMT"] is taking longer than %s to complete", spawn->cmd, spawn->pid,
+ format_timestamp_relative(timeout, sizeof(timeout), spawn->timeout));
+
+ return 1;
+}
+
+static int on_spawn_sigchld(sd_event_source *s, const siginfo_t *si, void *userdata) {
+ Spawn *spawn = userdata;
+
+ assert(spawn);
+
+ switch (si->si_code) {
+ case CLD_EXITED:
+ if (si->si_status != 0)
+ log_warning("process '%s' failed with exit code %i.", spawn->cmd, si->si_status);
+ else {
+ log_debug("process '%s' succeeded.", spawn->cmd);
+ sd_event_exit(sd_event_source_get_event(s), 0);
+
+ return 1;
+ }
+
+ break;
+ case CLD_KILLED:
+ case CLD_DUMPED:
+ log_warning("process '%s' terminated by signal %s.", spawn->cmd, signal_to_string(si->si_status));
+
+ break;
+ default:
+ log_error("process '%s' failed due to unknown reason.", spawn->cmd);
+ }
+
+ sd_event_exit(sd_event_source_get_event(s), -EIO);
+
+ return 1;
+}
+
static int spawn_wait(struct udev_event *event,
usec_t timeout_usec,
usec_t timeout_warn_usec,
const char *cmd, pid_t pid) {
- struct pollfd pfd[1];
- int err = 0;
-
- pfd[0].events = POLLIN;
- pfd[0].fd = event->fd_signal;
+ Spawn spawn = {
+ .cmd = cmd,
+ .pid = pid,
+ };
+ _cleanup_event_unref_ sd_event *e = NULL;
+ int r, ret;
- while (pid > 0) {
- int timeout;
- int timeout_warn = 0;
- int fdcount;
+ r = sd_event_new(&e);
+ if (r < 0)
+ return r;
- if (timeout_usec > 0) {
- usec_t age_usec;
+ if (timeout_usec > 0) {
+ usec_t usec, age_usec;
- age_usec = now(CLOCK_MONOTONIC) - event->birth_usec;
- if (age_usec >= timeout_usec)
- timeout = 1000;
- else {
- if (timeout_warn_usec > 0)
- timeout_warn = ((timeout_warn_usec - age_usec) / USEC_PER_MSEC) + MSEC_PER_SEC;
+ usec = now(clock_boottime_or_monotonic());
+ age_usec = usec - event->birth_usec;
+ if (age_usec < timeout_usec) {
+ if (timeout_warn_usec > 0 && timeout_warn_usec < timeout_usec && age_usec < timeout_warn_usec) {
+ spawn.timeout_warn = timeout_warn_usec - age_usec;
- timeout = ((timeout_usec - timeout_warn_usec - age_usec) / USEC_PER_MSEC) + MSEC_PER_SEC;
+ r = sd_event_add_time(e, NULL, clock_boottime_or_monotonic(),
+ usec + spawn.timeout_warn, USEC_PER_SEC,
+ on_spawn_timeout_warning, &spawn);
+ if (r < 0)
+ return r;
}
- } else {
- timeout = -1;
- }
- fdcount = poll(pfd, 1, timeout_warn);
- if (fdcount < 0) {
- if (errno == EINTR)
- continue;
- err = -errno;
- log_error_errno(errno, "failed to poll: %m");
- goto out;
- }
- if (fdcount == 0) {
- log_warning("slow: '%s' ["PID_FMT"]", cmd, pid);
+ spawn.timeout = timeout_usec - age_usec;
- fdcount = poll(pfd, 1, timeout);
- if (fdcount < 0) {
- if (errno == EINTR)
- continue;
- err = -errno;
- log_error_errno(errno, "failed to poll: %m");
- goto out;
- }
- if (fdcount == 0) {
- log_error("timeout: killing '%s' ["PID_FMT"]", cmd, pid);
- kill(pid, SIGKILL);
- }
+ r = sd_event_add_time(e, NULL, clock_boottime_or_monotonic(),
+ usec + spawn.timeout, USEC_PER_SEC, on_spawn_timeout, &spawn);
+ if (r < 0)
+ return r;
}
+ }
- if (pfd[0].revents & POLLIN) {
- struct signalfd_siginfo fdsi;
- int status;
- ssize_t size;
+ r = sd_event_add_child(e, NULL, pid, WEXITED, on_spawn_sigchld, &spawn);
+ if (r < 0)
+ return r;
- size = read(event->fd_signal, &fdsi, sizeof(struct signalfd_siginfo));
- if (size != sizeof(struct signalfd_siginfo))
- continue;
+ r = sd_event_loop(e);
+ if (r < 0)
+ return r;
- switch (fdsi.ssi_signo) {
- case SIGTERM:
- event->sigterm = true;
- break;
- case SIGCHLD:
- if (waitpid(pid, &status, WNOHANG) < 0)
- break;
- if (WIFEXITED(status)) {
- log_debug("'%s' ["PID_FMT"] exit with return code %i", cmd, pid, WEXITSTATUS(status));
- if (WEXITSTATUS(status) != 0)
- err = -1;
- } else if (WIFSIGNALED(status)) {
- log_error("'%s' ["PID_FMT"] terminated by signal %i (%s)", cmd, pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
- err = -1;
- } else if (WIFSTOPPED(status)) {
- log_error("'%s' ["PID_FMT"] stopped", cmd, pid);
- err = -1;
- } else if (WIFCONTINUED(status)) {
- log_error("'%s' ["PID_FMT"] continued", cmd, pid);
- err = -1;
- } else {
- log_error("'%s' ["PID_FMT"] exit with status 0x%04x", cmd, pid, status);
- err = -1;
- }
- pid = 0;
- break;
- }
- }
- }
-out:
- return err;
+ r = sd_event_get_exit_code(e, &ret);
+ if (r < 0)
+ return r;
+
+ return ret;
}
int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]) {
diff --git a/src/udev/udev.h b/src/udev/udev.h
index dece6eccab..1b17c615b8 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
@@ -44,11 +44,9 @@ struct udev_event {
struct udev_list run_list;
int exec_delay;
usec_t birth_usec;
- int fd_signal;
sd_rtnl *rtnl;
unsigned int builtin_run;
unsigned int builtin_ret;
- bool sigterm;
bool inotify_watch;
bool inotify_watch_final;
bool group_set;
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c
index fe092cfbd9..46ec0e3225 100644
--- a/src/udev/udevadm-test.c
+++ b/src/udev/udevadm-test.c
@@ -131,12 +131,6 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
sigfillset(&mask);
sigprocmask(SIG_SETMASK, &mask, &sigmask_orig);
- event->fd_signal = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
- if (event->fd_signal < 0) {
- fprintf(stderr, "error creating signalfd\n");
- rc = 5;
- goto out;
- }
udev_event_execute_rules(event,
60 * USEC_PER_SEC, 20 * USEC_PER_SEC,
@@ -154,8 +148,6 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
printf("run: '%s'\n", program);
}
out:
- if (event != NULL && event->fd_signal >= 0)
- close(event->fd_signal);
udev_builtin_exit(udev);
return rc;
}
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index b33a262ffc..34e88af539 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -41,6 +41,8 @@
#include <sys/inotify.h>
#include "sd-daemon.h"
+#include "sd-event.h"
+#include "event-util.h"
#include "rtnl-util.h"
#include "cgroup-util.h"
#include "process-util.h"
@@ -62,6 +64,7 @@ static usec_t arg_event_timeout_warn_usec = 180 * USEC_PER_SEC / 3;
typedef struct Manager {
struct udev *udev;
+ sd_event *event;
Hashmap *workers;
struct udev_list_node events;
char *cgroup;
@@ -74,17 +77,16 @@ typedef struct Manager {
struct udev_monitor *monitor;
struct udev_ctrl *ctrl;
struct udev_ctrl_connection *ctrl_conn_blocking;
-
- int fd_ep;
- int fd_ctrl;
- int fd_uevent;
- int fd_signal;
int fd_inotify;
- int fd_worker;
int worker_watch[2];
+ sd_event_source *ctrl_event;
+ sd_event_source *uevent_event;
+ sd_event_source *inotify_event;
+
+ usec_t last_usec;
+
bool stop_exec_queue:1;
- bool reload:1;
bool exit:1;
} Manager;
@@ -110,8 +112,8 @@ struct event {
dev_t devnum;
int ifindex;
bool is_block;
- usec_t start_usec;
- bool warned;
+ sd_event_source *timeout_warning;
+ sd_event_source *timeout;
};
static inline struct event *node_to_event(struct udev_list_node *node) {
@@ -151,6 +153,9 @@ static void event_free(struct event *event) {
udev_device_unref(event->dev);
udev_device_unref(event->dev_kernel);
+ sd_event_source_unref(event->timeout_warning);
+ sd_event_source_unref(event->timeout);
+
if (event->worker)
event->worker->event = NULL;
@@ -252,7 +257,12 @@ static int on_event_timeout_warning(sd_event_source *s, uint64_t usec, void *use
}
static void worker_attach_event(struct worker *worker, struct event *event) {
+ sd_event *e;
+ uint64_t usec;
+ int r;
+
assert(worker);
+ assert(worker->manager);
assert(event);
assert(!event->worker);
assert(!worker->event);
@@ -260,9 +270,19 @@ static void worker_attach_event(struct worker *worker, struct event *event) {
worker->state = WORKER_RUNNING;
worker->event = event;
event->state = EVENT_RUNNING;
- event->start_usec = now(CLOCK_MONOTONIC);
- event->warned = false;
event->worker = worker;
+
+ e = worker->manager->event;
+
+ r = sd_event_now(e, clock_boottime_or_monotonic(), &usec);
+ if (r < 0)
+ return;
+
+ (void) sd_event_add_time(e, &event->timeout_warning, clock_boottime_or_monotonic(),
+ usec + arg_event_timeout_warn_usec, USEC_PER_SEC, on_event_timeout_warning, event);
+
+ (void) sd_event_add_time(e, &event->timeout, clock_boottime_or_monotonic(),
+ usec + arg_event_timeout_usec, USEC_PER_SEC, on_event_timeout, event);
}
static void manager_free(Manager *manager) {
@@ -271,7 +291,12 @@ static void manager_free(Manager *manager) {
udev_builtin_exit(manager->udev);
+ sd_event_source_unref(manager->ctrl_event);
+ sd_event_source_unref(manager->uevent_event);
+ sd_event_source_unref(manager->inotify_event);
+
udev_unref(manager->udev);
+ sd_event_unref(manager->event);
manager_workers_free(manager);
event_queue_cleanup(manager, EVENT_UNDEF);
@@ -283,8 +308,6 @@ static void manager_free(Manager *manager) {
udev_rules_unref(manager->rules);
free(manager->cgroup);
- safe_close(manager->fd_ep);
- safe_close(manager->fd_signal);
safe_close(manager->fd_inotify);
safe_close_pair(manager->worker_watch);
@@ -328,18 +351,23 @@ static void worker_spawn(Manager *manager, struct event *event) {
dev = event->dev;
event->dev = NULL;
+ unsetenv("NOTIFY_SOCKET");
+
manager_workers_free(manager);
event_queue_cleanup(manager, EVENT_UNDEF);
manager->monitor = udev_monitor_unref(manager->monitor);
manager->ctrl_conn_blocking = udev_ctrl_connection_unref(manager->ctrl_conn_blocking);
manager->ctrl = udev_ctrl_unref(manager->ctrl);
-
- manager->fd_ep = safe_close(manager->fd_ep);
- manager->fd_signal = safe_close(manager->fd_signal);
- manager->fd_inotify = safe_close(manager->fd_inotify);
+ manager->ctrl_conn_blocking = udev_ctrl_connection_unref(manager->ctrl_conn_blocking);
manager->worker_watch[READ_END] = safe_close(manager->worker_watch[READ_END]);
+ manager->ctrl_event = sd_event_source_unref(manager->ctrl_event);
+ manager->uevent_event = sd_event_source_unref(manager->uevent_event);
+ manager->inotify_event = sd_event_source_unref(manager->inotify_event);
+
+ manager->event = sd_event_unref(manager->event);
+
sigfillset(&mask);
fd_signal = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
if (fd_signal < 0) {
@@ -380,9 +408,6 @@ static void worker_spawn(Manager *manager, struct event *event) {
goto out;
}
- /* needed for SIGCHLD/SIGTERM in spawn() */
- udev_event->fd_signal = fd_signal;
-
if (arg_exec_delay > 0)
udev_event->exec_delay = arg_exec_delay;
@@ -455,11 +480,6 @@ skip:
udev_device_unref(dev);
dev = NULL;
- if (udev_event->sigterm) {
- udev_event_unref(udev_event);
- goto out;
- }
-
udev_event_unref(udev_event);
/* wait for more device messages from main udevd, or term signal */
@@ -690,11 +710,104 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
return false;
}
+static int on_exit_timeout(sd_event_source *s, uint64_t usec, void *userdata) {
+ Manager *manager = userdata;
+
+ assert(manager);
+
+ log_error_errno(ETIMEDOUT, "giving up waiting for workers to finish");
+
+ sd_event_exit(manager->event, -ETIMEDOUT);
+
+ return 1;
+}
+
+static void manager_exit(Manager *manager) {
+ uint64_t usec;
+ int r;
+
+ assert(manager);
+
+ manager->exit = true;
+
+ sd_notify(false,
+ "STOPPING=1\n"
+ "STATUS=Starting shutdown...");
+
+ /* close sources of new events and discard buffered events */
+ manager->ctrl = udev_ctrl_unref(manager->ctrl);
+ manager->ctrl_event = sd_event_source_unref(manager->ctrl_event);
+
+ manager->fd_inotify = safe_close(manager->fd_inotify);
+ manager->inotify_event = sd_event_source_unref(manager->inotify_event);
+
+ manager->monitor = udev_monitor_unref(manager->monitor);
+ manager->uevent_event = sd_event_source_unref(manager->uevent_event);
+
+ /* discard queued events and kill workers */
+ event_queue_cleanup(manager, EVENT_QUEUED);
+ manager_kill_workers(manager);
+
+ r = sd_event_now(manager->event, clock_boottime_or_monotonic(), &usec);
+ if (r < 0)
+ return;
+
+ r = sd_event_add_time(manager->event, NULL, clock_boottime_or_monotonic(),
+ usec + 30 * USEC_PER_SEC, USEC_PER_SEC, on_exit_timeout, manager);
+ if (r < 0)
+ return;
+}
+
+/* reload requested, HUP signal received, rules changed, builtin changed */
+static void manager_reload(Manager *manager) {
+
+ assert(manager);
+
+ sd_notify(false,
+ "RELOADING=1\n"
+ "STATUS=Flushing configuration...");
+
+ manager_kill_workers(manager);
+ manager->rules = udev_rules_unref(manager->rules);
+ udev_builtin_exit(manager->udev);
+
+ sd_notify(false,
+ "READY=1\n"
+ "STATUS=Processing...");
+}
+
static void event_queue_start(Manager *manager) {
struct udev_list_node *loop;
+ usec_t usec;
+ int r;
assert(manager);
+ if (udev_list_node_is_empty(&manager->events) ||
+ manager->exit || manager->stop_exec_queue)
+ return;
+
+ r = sd_event_now(manager->event, clock_boottime_or_monotonic(), &usec);
+ if (r >= 0) {
+ /* check for changed config, every 3 seconds at most */
+ if (manager->last_usec == 0 ||
+ (usec - manager->last_usec) > 3 * USEC_PER_SEC) {
+ if (udev_rules_check_timestamp(manager->rules) ||
+ udev_builtin_validate(manager->udev))
+ manager_reload(manager);
+
+ manager->last_usec = usec;
+ }
+ }
+
+ udev_builtin_init(manager->udev);
+
+ if (!manager->rules) {
+ manager->rules = udev_rules_new(manager->udev, arg_resolve_names);
+ if (!manager->rules)
+ return;
+ }
+
udev_list_node_foreach(loop, &manager->events) {
struct event *event = node_to_event(loop);
@@ -788,6 +901,9 @@ static int on_worker(sd_event_source *s, int fd, uint32_t revents, void *userdat
event_free(worker->event);
}
+ /* we have free workers, try to schedule events */
+ event_queue_start(manager);
+
return 1;
}
@@ -804,6 +920,9 @@ static int on_uevent(sd_event_source *s, int fd, uint32_t revents, void *userdat
r = event_queue_insert(manager, dev);
if (r < 0)
udev_device_unref(dev);
+ else
+ /* we have fresh events, try to schedule them */
+ event_queue_start(manager);
}
return 1;
@@ -842,11 +961,12 @@ static int on_ctrl_msg(sd_event_source *s, int fd, uint32_t revents, void *userd
if (udev_ctrl_get_start_exec_queue(ctrl_msg) > 0) {
log_debug("udevd message (START_EXEC_QUEUE) received");
manager->stop_exec_queue = false;
+ event_queue_start(manager);
}
if (udev_ctrl_get_reload(ctrl_msg) > 0) {
log_debug("udevd message (RELOAD) received");
- manager->reload = true;
+ manager_reload(manager);
}
str = udev_ctrl_get_set_env(ctrl_msg);
@@ -885,7 +1005,7 @@ static int on_ctrl_msg(sd_event_source *s, int fd, uint32_t revents, void *userd
if (udev_ctrl_get_exit(ctrl_msg) > 0) {
log_debug("udevd message (EXIT) received");
- manager->exit = true;
+ manager_exit(manager);
/* keep reference to block the client until we exit
TODO: deal with several blocking exit requests */
manager->ctrl_conn_blocking = udev_ctrl_connection_ref(ctrl_conn);
@@ -1043,7 +1163,7 @@ static int on_sigterm(sd_event_source *s, const struct signalfd_siginfo *si, voi
assert(manager);
- manager->exit = true;
+ manager_exit(manager);
return 1;
}
@@ -1053,7 +1173,7 @@ static int on_sighup(sd_event_source *s, const struct signalfd_siginfo *si, void
assert(manager);
- manager->reload = true;
+ manager_reload(manager);
return 1;
}
@@ -1108,6 +1228,36 @@ static int on_sigchld(sd_event_source *s, const struct signalfd_siginfo *si, voi
worker_free(worker);
}
+ /* we can start new workers, try to schedule events */
+ event_queue_start(manager);
+
+ return 1;
+}
+
+static int on_post(sd_event_source *s, void *userdata) {
+ Manager *manager = userdata;
+ int r;
+
+ assert(manager);
+
+ if (udev_list_node_is_empty(&manager->events)) {
+ /* no pending events */
+ if (!hashmap_isempty(manager->workers)) {
+ /* there are idle workers */
+ log_debug("cleanup idle workers");
+ manager_kill_workers(manager);
+ } else {
+ /* we are idle */
+ if (manager->exit) {
+ r = sd_event_exit(manager->event, 0);
+ if (r < 0)
+ return r;
+ } else if (manager->cgroup)
+ /* cleanup possible left-over processes in our cgroup */
+ cg_kill(SYSTEMD_CGROUP_CONTROLLER, manager->cgroup, SIGKILL, false, true, NULL);
+ }
+ }
+
return 1;
}
@@ -1289,13 +1439,7 @@ static int parse_argv(int argc, char *argv[]) {
static int manager_new(Manager **ret) {
_cleanup_(manager_freep) Manager *manager = NULL;
- struct epoll_event ep_ctrl = { .events = EPOLLIN };
- struct epoll_event ep_inotify = { .events = EPOLLIN };
- struct epoll_event ep_signal = { .events = EPOLLIN };
- struct epoll_event ep_netlink = { .events = EPOLLIN };
- struct epoll_event ep_worker = { .events = EPOLLIN };
- sigset_t mask;
- int r, one = 1;
+ int r, fd_ctrl, fd_uevent;
assert(ret);
@@ -1303,10 +1447,6 @@ static int manager_new(Manager **ret) {
if (!manager)
return log_oom();
- manager->fd_ep = -1;
- manager->fd_ctrl = -1;
- manager->fd_uevent = -1;
- manager->fd_signal = -1;
manager->fd_inotify = -1;
manager->worker_watch[WRITE_END] = -1;
manager->worker_watch[READ_END] = -1;
@@ -1324,14 +1464,14 @@ static int manager_new(Manager **ret) {
udev_list_node_init(&manager->events);
udev_list_init(manager->udev, &manager->properties, true);
- r = systemd_fds(&manager->fd_ctrl, &manager->fd_uevent);
+ r = systemd_fds(&fd_ctrl, &fd_uevent);
if (r >= 0) {
/* get control and netlink socket from systemd */
- manager->ctrl = udev_ctrl_new_from_fd(manager->udev, manager->fd_ctrl);
+ manager->ctrl = udev_ctrl_new_from_fd(manager->udev, fd_ctrl);
if (!manager->ctrl)
return log_error_errno(EINVAL, "error taking over udev control socket");
- manager->monitor = udev_monitor_new_from_netlink_fd(manager->udev, "kernel", manager->fd_uevent);
+ manager->monitor = udev_monitor_new_from_netlink_fd(manager->udev, "kernel", fd_uevent);
if (!manager->monitor)
return log_error_errno(EINVAL, "error taking over netlink socket");
@@ -1345,13 +1485,13 @@ static int manager_new(Manager **ret) {
if (!manager->ctrl)
return log_error_errno(EINVAL, "error initializing udev control socket");
- manager->fd_ctrl = udev_ctrl_get_fd(manager->ctrl);
+ fd_ctrl = udev_ctrl_get_fd(manager->ctrl);
manager->monitor = udev_monitor_new_from_netlink(manager->udev, "kernel");
if (!manager->monitor)
return log_error_errno(EINVAL, "error initializing netlink socket");
- manager->fd_uevent = udev_monitor_get_fd(manager->monitor);
+ fd_uevent = udev_monitor_get_fd(manager->monitor);
(void) udev_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024);
}
@@ -1364,14 +1504,26 @@ static int manager_new(Manager **ret) {
if (r < 0)
return log_error_errno(EINVAL, "error binding udev control socket");
+ *ret = manager;
+ manager = NULL;
+
+ return 0;
+}
+
+static int manager_listen(Manager *manager) {
+ sigset_t mask;
+ int r, fd_worker, one = 1;
+
+ assert(manager);
+
/* unnamed socket from workers to the main daemon */
r = socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, manager->worker_watch);
if (r < 0)
return log_error_errno(errno, "error creating socketpair: %m");
- manager->fd_worker = manager->worker_watch[READ_END];
+ fd_worker = manager->worker_watch[READ_END];
- r = setsockopt(manager->fd_worker, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one));
+ r = setsockopt(fd_worker, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one));
if (r < 0)
return log_error_errno(errno, "could not enable SO_PASSCRED: %m");
@@ -1384,31 +1536,60 @@ static int manager_new(Manager **ret) {
/* block and listen to all signals on signalfd */
sigfillset(&mask);
sigprocmask(SIG_SETMASK, &mask, &manager->sigmask_orig);
- manager->fd_signal = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
- if (manager->fd_signal < 0)
- return log_error_errno(errno, "error creating signalfd");
-
- ep_ctrl.data.fd = manager->fd_ctrl;
- ep_inotify.data.fd = manager->fd_inotify;
- ep_signal.data.fd = manager->fd_signal;
- ep_netlink.data.fd = manager->fd_uevent;
- ep_worker.data.fd = manager->fd_worker;
-
- manager->fd_ep = epoll_create1(EPOLL_CLOEXEC);
- if (manager->fd_ep < 0)
- return log_error_errno(errno, "error creating epoll fd: %m");
-
- if (epoll_ctl(manager->fd_ep, EPOLL_CTL_ADD, manager->fd_ctrl, &ep_ctrl) < 0 ||
- epoll_ctl(manager->fd_ep, EPOLL_CTL_ADD, manager->fd_inotify, &ep_inotify) < 0 ||
- epoll_ctl(manager->fd_ep, EPOLL_CTL_ADD, manager->fd_signal, &ep_signal) < 0 ||
- epoll_ctl(manager->fd_ep, EPOLL_CTL_ADD, manager->fd_uevent, &ep_netlink) < 0 ||
- epoll_ctl(manager->fd_ep, EPOLL_CTL_ADD, manager->fd_worker, &ep_worker) < 0)
- return log_error_errno(errno, "fail to add fds to epoll: %m");
- *ret = manager;
- manager = NULL;
+ r = sd_event_default(&manager->event);
+ if (r < 0)
+ return log_error_errno(errno, "could not allocate event loop: %m");
- return 1;
+ r = sd_event_add_signal(manager->event, NULL, SIGINT, on_sigterm, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating sigint event source: %m");
+
+ r = sd_event_add_signal(manager->event, NULL, SIGTERM, on_sigterm, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating sigterm event source: %m");
+
+ r = sd_event_add_signal(manager->event, NULL, SIGHUP, on_sighup, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating sighup event source: %m");
+
+ r = sd_event_add_signal(manager->event, NULL, SIGCHLD, on_sigchld, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating sigchld event source: %m");
+
+ r = sd_event_set_watchdog(manager->event, true);
+ if (r < 0)
+ return log_error_errno(r, "error creating watchdog event source: %m");
+
+ r = sd_event_add_io(manager->event, &manager->ctrl_event, udev_ctrl_get_fd(manager->ctrl), EPOLLIN, on_ctrl_msg, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating ctrl event source: %m");
+
+ /* This needs to be after the inotify and uevent handling, to make sure
+ * that the ping is send back after fully processing the pending uevents
+ * (including the synthetic ones we may create due to inotify events).
+ */
+ r = sd_event_source_set_priority(manager->ctrl_event, SD_EVENT_PRIORITY_IDLE);
+ if (r < 0)
+ return log_error_errno(r, "cold not set IDLE event priority for ctrl event source: %m");
+
+ r = sd_event_add_io(manager->event, &manager->inotify_event, manager->fd_inotify, EPOLLIN, on_inotify, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating inotify event source: %m");
+
+ r = sd_event_add_io(manager->event, &manager->uevent_event, udev_monitor_get_fd(manager->monitor), EPOLLIN, on_uevent, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating uevent event source: %m");
+
+ r = sd_event_add_io(manager->event, NULL, fd_worker, EPOLLIN, on_worker, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating worker event source: %m");
+
+ r = sd_event_add_post(manager->event, NULL, on_post, manager);
+ if (r < 0)
+ return log_error_errno(r, "error creating post event source: %m");
+
+ return 0;
}
int main(int argc, char *argv[]) {
@@ -1447,23 +1628,6 @@ int main(int argc, char *argv[]) {
log_debug("set children_max to %u", arg_children_max);
}
- /* before opening new files, make sure std{in,out,err} fds are in a sane state */
- if (arg_daemonize) {
- int fd;
-
- fd = open("/dev/null", O_RDWR);
- if (fd < 0)
- log_error("cannot open /dev/null");
- else {
- if (write(STDOUT_FILENO, 0, 0) < 0)
- dup2(fd, STDOUT_FILENO);
- if (write(STDERR_FILENO, 0, 0) < 0)
- dup2(fd, STDERR_FILENO);
- if (fd > STDERR_FILENO)
- close(fd);
- }
- }
-
/* set umask before creating any file/directory */
r = chdir("/");
if (r < 0) {
@@ -1491,8 +1655,6 @@ int main(int argc, char *argv[]) {
if (r < 0)
goto exit;
- log_info("starting version " VERSION);
-
r = udev_rules_apply_static_dev_perms(manager->rules);
if (r < 0)
log_error_errno(r, "failed to apply permissions on static device nodes: %m");
@@ -1500,6 +1662,8 @@ int main(int argc, char *argv[]) {
if (arg_daemonize) {
pid_t pid;
+ log_info("starting version " VERSION);
+
pid = fork();
switch (pid) {
case 0:
@@ -1517,187 +1681,27 @@ int main(int argc, char *argv[]) {
write_string_file("/proc/self/oom_score_adj", "-1000");
} else
- sd_notify(1, "READY=1");
-
- for (;;) {
- static usec_t last_usec;
- struct epoll_event ev[8];
- int fdcount;
- int timeout;
- bool is_worker, is_signal, is_inotify, is_uevent, is_ctrl;
- int i;
-
- if (manager->exit) {
- /* close sources of new events and discard buffered events */
- if (manager->fd_ctrl >= 0) {
- epoll_ctl(manager->fd_ep, EPOLL_CTL_DEL, manager->fd_ctrl, NULL);
- manager->fd_ctrl = safe_close(manager->fd_ctrl);
- }
-
- if (manager->monitor) {
- epoll_ctl(manager->fd_ep, EPOLL_CTL_DEL, manager->fd_uevent, NULL);
- manager->monitor = udev_monitor_unref(manager->monitor);
- }
-
- if (manager->fd_inotify >= 0) {
- epoll_ctl(manager->fd_ep, EPOLL_CTL_DEL, manager->fd_inotify, NULL);
- manager->fd_inotify = safe_close(manager->fd_inotify);
- }
-
- /* discard queued events and kill workers */
- event_queue_cleanup(manager, EVENT_QUEUED);
- manager_kill_workers(manager);
-
- /* exit after all has cleaned up */
- if (udev_list_node_is_empty(&manager->events) && hashmap_isempty(manager->workers))
- break;
+ sd_notify(false,
+ "READY=1\n"
+ "STATUS=Processing...");
- /* timeout at exit for workers to finish */
- timeout = 30 * MSEC_PER_SEC;
- } else if (udev_list_node_is_empty(&manager->events) && hashmap_isempty(manager->workers)) {
- /* we are idle */
- timeout = -1;
-
- /* cleanup possible left-over processes in our cgroup */
- if (manager->cgroup)
- cg_kill(SYSTEMD_CGROUP_CONTROLLER, manager->cgroup, SIGKILL, false, true, NULL);
- } else {
- /* kill idle or hanging workers */
- timeout = 3 * MSEC_PER_SEC;
- }
-
- fdcount = epoll_wait(manager->fd_ep, ev, ELEMENTSOF(ev), timeout);
- if (fdcount < 0)
- continue;
-
- if (fdcount == 0) {
- struct worker *worker;
- Iterator j;
-
- /* timeout */
- if (manager->exit) {
- log_error("timeout, giving up waiting for workers to finish");
- break;
- }
-
- /* kill idle workers */
- if (udev_list_node_is_empty(&manager->events)) {
- log_debug("cleanup idle workers");
- manager_kill_workers(manager);
- }
-
- /* check for hanging events */
- HASHMAP_FOREACH(worker, manager->workers, j) {
- struct event *event = worker->event;
- usec_t ts;
-
- if (worker->state != WORKER_RUNNING)
- continue;
-
- assert(event);
-
- ts = now(CLOCK_MONOTONIC);
-
- if ((ts - event->start_usec) > arg_event_timeout_warn_usec) {
- if ((ts - event->start_usec) > arg_event_timeout_usec)
- on_event_timeout(NULL, 0, event);
- else if (!event->warned) {
- on_event_timeout_warning(NULL, 0, event);
- event->warned = true;
- }
- }
- }
-
- }
-
- is_worker = is_signal = is_inotify = is_uevent = is_ctrl = false;
- for (i = 0; i < fdcount; i++) {
- if (ev[i].data.fd == manager->fd_worker && ev[i].events & EPOLLIN)
- is_worker = true;
- else if (ev[i].data.fd == manager->fd_uevent && ev[i].events & EPOLLIN)
- is_uevent = true;
- else if (ev[i].data.fd == manager->fd_signal && ev[i].events & EPOLLIN)
- is_signal = true;
- else if (ev[i].data.fd == manager->fd_inotify && ev[i].events & EPOLLIN)
- is_inotify = true;
- else if (ev[i].data.fd == manager->fd_ctrl && ev[i].events & EPOLLIN)
- is_ctrl = true;
- }
-
- /* check for changed config, every 3 seconds at most */
- if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * USEC_PER_SEC) {
- if (udev_rules_check_timestamp(manager->rules))
- manager->reload = true;
- if (udev_builtin_validate(manager->udev))
- manager->reload = true;
-
- last_usec = now(CLOCK_MONOTONIC);
- }
-
- /* reload requested, HUP signal received, rules changed, builtin changed */
- if (manager->reload) {
- manager_kill_workers(manager);
- manager->rules = udev_rules_unref(manager->rules);
- udev_builtin_exit(manager->udev);
- manager->reload = false;
- }
-
- /* event has finished */
- if (is_worker)
- on_worker(NULL, manager->fd_worker, 0, manager);
-
- /* uevent from kernel */
- if (is_uevent)
- on_uevent(NULL, manager->fd_uevent, 0, manager);
-
- /* start new events */
- if (!udev_list_node_is_empty(&manager->events) && !manager->exit && !manager->stop_exec_queue) {
- udev_builtin_init(manager->udev);
- if (!manager->rules)
- manager->rules = udev_rules_new(manager->udev, arg_resolve_names);
- if (manager->rules)
- event_queue_start(manager);
- }
-
- if (is_signal) {
- struct signalfd_siginfo fdsi;
- ssize_t size;
-
- size = read(manager->fd_signal, &fdsi, sizeof(struct signalfd_siginfo));
- if (size == sizeof(struct signalfd_siginfo)) {
- switch (fdsi.ssi_signo) {
- case SIGINT:
- case SIGTERM:
- on_sigterm(NULL, &fdsi, manager);
- break;
- case SIGHUP:
- on_sighup(NULL, &fdsi, manager);
- break;
- case SIGCHLD:
- on_sigchld(NULL, &fdsi, manager);
- break;
- }
- }
- }
-
- /* we are shutting down, the events below are not handled anymore */
- if (manager->exit)
- continue;
-
- /* device node watch */
- if (is_inotify)
- on_inotify(NULL, manager->fd_inotify, 0, manager);
+ r = manager_listen(manager);
+ if (r < 0)
+ return log_error_errno(r, "failed to set up fds and listen for events: %m");
- /*
- * This needs to be after the inotify handling, to make sure,
- * that the ping is send back after the possibly generated
- * "change" events by the inotify device node watch.
- */
- if (is_ctrl)
- on_ctrl_msg(NULL, manager->fd_ctrl, 0, manager);
+ r = sd_event_loop(manager->event);
+ if (r < 0) {
+ log_error_errno(r, "event loop failed: %m");
+ goto exit;
}
+ sd_event_get_exit_code(manager->event, &r);
+
exit:
+ sd_notify(false,
+ "STOPPING=1\n"
+ "STATUS=Shutting down...");
+
if (manager)
udev_ctrl_cleanup(manager->ctrl);
mac_selinux_finish();
diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf
index 32196723f9..3cb0c63815 100644
--- a/tmpfiles.d/legacy.conf
+++ b/tmpfiles.d/legacy.conf
@@ -26,7 +26,7 @@ d /run/lock/subsys 0755 root root -
d /run/lock/lockdev 0775 root lock -
-# /forcefsck, /fastboot and /forcequotecheck are deprecated in favor of the
+# /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the
# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and
# 'quotacheck.mode=force'
diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in
index 32f04d901a..e7216d61f2 100644
--- a/units/systemd-udevd.service.in
+++ b/units/systemd-udevd.service.in
@@ -23,3 +23,4 @@ RestartSec=0
ExecStart=@rootlibexecdir@/systemd-udevd
MountFlags=slave
KillMode=mixed
+WatchdogSec=1min