diff --git a/meson.build b/meson.build index ed0e46d493..3310f3bef2 100644 --- a/meson.build +++ b/meson.build @@ -221,9 +221,13 @@ status_unit_format_default = get_option('status-unit-format-default') conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir) conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'system')) -conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir) +conf.set_quoted('SYSTEM_DATA_UNIT_DIR', systemunitdir) +conf.set_quoted('SYSTEM_PRESET_DIR', systempresetdir) +conf.set_quoted('USER_PRESET_DIR', userpresetdir) conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path) conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) +conf.set_quoted('UDEV_HWDB_DIR', udevhwdbdir) +conf.set_quoted('UDEV_RULES_DIR', udevrulesdir) conf.set_quoted('RC_LOCAL_PATH', get_option('rc-local')) conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper()) @@ -259,6 +263,13 @@ conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', join_paths(pkgdata conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', join_paths(pkgdatadir, 'language-fallback-map')) conf.set_quoted('SYSTEMD_TEST_DATA', join_paths(testsdir, 'testdata')) conf.set_quoted('SYSTEMD_CATALOG_DIR', catalogdir) +conf.set_quoted('BINFMT_DIR', binfmtdir) +conf.set_quoted('SYSCTL_DIR', sysctldir) +conf.set_quoted('SYSUSERS_DIR', sysusersdir) +conf.set_quoted('TMPFILES_DIR', tmpfilesdir) +conf.set_quoted('ENVIRONMENT_DIR', environmentdir) +conf.set_quoted('MODULESLOAD_DIR', modulesloaddir) +conf.set_quoted('MODPROBE_DIR', modprobedir) conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir) conf.set_quoted('POLKIT_AGENT_BINARY_PATH', join_paths(bindir, 'pkttyagent')) conf.set_quoted('LIBDIR', libdir) diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c index e53c2302b1..ba5c2c47b9 100644 --- a/src/basic/path-lookup.c +++ b/src/basic/path-lookup.c @@ -622,7 +622,7 @@ int lookup_paths_init( STRV_IFNOTNULL(runtime_attached), STRV_IFNOTNULL(generator), "/usr/local/lib/systemd/system", - SYSTEM_DATA_UNIT_PATH, + SYSTEM_DATA_UNIT_DIR, "/usr/lib/systemd/system", STRV_IFNOTNULL(flags & LOOKUP_PATHS_SPLIT_USR ? "/lib/systemd/system" : NULL), STRV_IFNOTNULL(generator_late)); diff --git a/src/boot/bless-boot-generator.c b/src/boot/bless-boot-generator.c index 001c85a238..44a14f027d 100644 --- a/src/boot/bless-boot-generator.c +++ b/src/boot/bless-boot-generator.c @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) { * even emergency.target. */ p = strjoina(arg_dest, "/" SPECIAL_BASIC_TARGET ".wants/systemd-bless-boot.service"); (void) mkdir_parents(p, 0755); - if (symlink(SYSTEM_DATA_UNIT_PATH "/systemd-bless-boot.service", p) < 0) { + if (symlink(SYSTEM_DATA_UNIT_DIR "/systemd-bless-boot.service", p) < 0) { log_error_errno(errno, "Failed to create symlink '%s': %m", p); return EXIT_FAILURE; } diff --git a/src/debug-generator/debug-generator.c b/src/debug-generator/debug-generator.c index d9fccea5c9..a8f3422dd4 100644 --- a/src/debug-generator/debug-generator.c +++ b/src/debug-generator/debug-generator.c @@ -134,7 +134,7 @@ static int generate_wants_symlinks(void) { if (!p) return log_oom(); - f = path_join(SYSTEM_DATA_UNIT_PATH, *u); + f = path_join(SYSTEM_DATA_UNIT_DIR, *u); if (!f) return log_oom(); diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index c0ded48d97..1d8ee93013 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -881,7 +881,7 @@ static int add_volatile_root(void) { return 0; return generator_add_symlink(arg_dest, SPECIAL_INITRD_ROOT_FS_TARGET, "requires", - SYSTEM_DATA_UNIT_PATH "/" SPECIAL_VOLATILE_ROOT_SERVICE); + SYSTEM_DATA_UNIT_DIR "/" SPECIAL_VOLATILE_ROOT_SERVICE); } static int add_volatile_var(void) { diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 2f26214ec3..aa5a0a6ddb 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -28,7 +28,7 @@ static int add_symlink(const char *fservice, const char *tservice) { assert(fservice); assert(tservice); - from = strjoina(SYSTEM_DATA_UNIT_PATH "/", fservice); + from = strjoina(SYSTEM_DATA_UNIT_DIR "/", fservice); to = strjoina(arg_dest, "/getty.target.wants/", tservice); mkdir_parents_label(to, 0755); diff --git a/src/hibernate-resume/hibernate-resume-generator.c b/src/hibernate-resume/hibernate-resume-generator.c index b1e5452bb0..5e986db2b0 100644 --- a/src/hibernate-resume/hibernate-resume-generator.c +++ b/src/hibernate-resume/hibernate-resume-generator.c @@ -85,7 +85,7 @@ static int process_resume(void) { return log_oom(); mkdir_parents_label(lnk, 0755); - if (symlink(SYSTEM_DATA_UNIT_PATH "/systemd-hibernate-resume@.service", lnk) < 0) + if (symlink(SYSTEM_DATA_UNIT_DIR "/systemd-hibernate-resume@.service", lnk) < 0) return log_error_errno(errno, "Failed to create symlink %s: %m", lnk); r = unit_name_from_path(arg_resume_device, ".device", &device_unit); diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c index 61ed7cb2da..4fe0903c1d 100644 --- a/src/libsystemd/sd-path/sd-path.c +++ b/src/libsystemd/sd-path/sd-path.c @@ -325,7 +325,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) { return 0; case SD_PATH_SYSTEMD_SYSTEM_UNIT: - *ret = SYSTEM_DATA_UNIT_PATH; + *ret = SYSTEM_DATA_UNIT_DIR; return 0; case SD_PATH_SYSTEMD_SYSTEM_PRESET: diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index ad8dfabb54..99cffee3ec 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -24,7 +24,7 @@ static int add_symlink(const char *service, const char *where) { assert(service); assert(where); - from = strjoina(SYSTEM_DATA_UNIT_PATH "/", service); + from = strjoina(SYSTEM_DATA_UNIT_DIR "/", service); to = strjoina(arg_dest, "/", where, ".wants/", service); (void) mkdir_parents_label(to, 0755); diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in index 0d27c1703a..3a0169a85f 100644 --- a/src/rpm/macros.systemd.in +++ b/src/rpm/macros.systemd.in @@ -5,25 +5,25 @@ # RPM macros for packages installing systemd unit files -%_systemd_util_dir @rootlibexecdir@ -%_unitdir @systemunitdir@ -%_userunitdir @userunitdir@ -%_presetdir @systempresetdir@ -%_userpresetdir @userpresetdir@ -%_udevhwdbdir @udevhwdbdir@ -%_udevrulesdir @udevrulesdir@ -%_journalcatalogdir @catalogdir@ -%_binfmtdir @binfmtdir@ -%_sysctldir @sysctldir@ -%_sysusersdir @sysusersdir@ -%_tmpfilesdir @tmpfilesdir@ -%_environmentdir @environmentdir@ -%_modulesloaddir @modulesloaddir@ -%_modprobedir @modprobedir@ -%_systemdgeneratordir @systemgeneratordir@ -%_systemdusergeneratordir @usergeneratordir@ -%_systemd_system_env_generator_dir @systemenvgeneratordir@ -%_systemd_user_env_generator_dir @userenvgeneratordir@ +%_systemd_util_dir {{ROOTLIBEXECDIR}} +%_unitdir {{SYSTEM_DATA_UNIT_DIR}} +%_userunitdir {{USER_DATA_UNIT_DIR}} +%_presetdir {{SYSTEM_PRESET_DIR}} +%_userpresetdir {{USER_PRESET_DIR}} +%_udevhwdbdir {{UDEV_HWDB_DIR}} +%_udevrulesdir {{UDEV_RULES_DIR}} +%_journalcatalogdir {{SYSTEMD_CATALOG_DIR}} +%_binfmtdir {{BINFMT_DIR}} +%_sysctldir {{SYSCTL_DIR}} +%_sysusersdir {{SYSUSERS_DIR}} +%_tmpfilesdir {{TMPFILES_DIR}} +%_environmentdir {{ENVIRONMENT_DIR}} +%_modulesloaddir {{MODULESLOAD_DIR}} +%_modprobedir {{MODPROBE_DIR}} +%_systemdgeneratordir {{SYSTEM_GENERATOR_DIR}} +%_systemdusergeneratordir {{USER_GENERATOR_DIR}} +%_systemd_system_env_generator_dir {{SYSTEM_ENV_GENERATOR_DIR}} +%_systemd_user_env_generator_dir {{USER_ENV_GENERATOR_DIR}} # Because we had one release with a typo... # This is temporary (Remove after systemd 240 is released) @@ -162,10 +162,10 @@ SYSTEMD_INLINE_EOF\ %sysctl_apply() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysctl_apply}} \ -[ -x @rootlibexecdir@/systemd-sysctl ] && @rootlibexecdir@/systemd-sysctl %{?*} || : \ +[ -x {{ROOTLIBEXECDIR}}/systemd-sysctl ] && {{ROOTLIBEXECDIR}}/systemd-sysctl %{?*} || : \ %{nil} %binfmt_apply() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# binfmt_apply}} \ -[ -x @rootlibexecdir@/systemd-binfmt ] && @rootlibexecdir@/systemd-binfmt %{?*} || : \ +[ -x {{ROOTLIBEXECDIR}}/systemd-binfmt ] && {{ROOTLIBEXECDIR}}/systemd-binfmt %{?*} || : \ %{nil} diff --git a/src/rpm/meson.build b/src/rpm/meson.build index d299b18019..fc72fee73c 100644 --- a/src/rpm/meson.build +++ b/src/rpm/meson.build @@ -1,18 +1,22 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -configure_file( - input : 'macros.systemd.in', - output : 'macros.systemd', - configuration : substs, - install_dir : rpmmacrosdir == 'no' ? '' : rpmmacrosdir) +in_files = [ + ['macros.systemd', rpmmacrosdir != 'no'], + ['triggers.systemd', false], + ['triggers.systemd.sh', false]] -# Those doesn't get installed anywhere, one of them needs to included in the -# rpm spec file definition. -configure_file( - input : 'triggers.systemd.in', - output : 'triggers.systemd', - configuration : substs) -configure_file( - input : 'triggers.systemd.sh.in', - output : 'triggers.systemd.sh', - configuration : substs) +# The last two don't get installed anywhere, one of them needs to included in +# the rpm spec file definition instead. + +foreach tuple : in_files + file = tuple[0] + custom_target( + file, + input : file + '.in', + output : file, + command : [meson_render_jinja2, config_h, '@INPUT@'], + capture : true, + install : tuple[1], + install_dir : rpmmacrosdir, + build_by_default : true) +endforeach diff --git a/src/rpm/triggers.systemd.in b/src/rpm/triggers.systemd.in index 3a89f9169d..b33d2212e8 100644 --- a/src/rpm/triggers.systemd.in +++ b/src/rpm/triggers.systemd.in @@ -8,7 +8,7 @@ # # Minimum rpm version supported: 4.14.0 -%transfiletriggerin -P 900900 -p -- @systemunitdir@ /etc/systemd/system +%transfiletriggerin -P 900900 -p -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system -- This script will run after any package is initially installed or -- upgraded. We care about the case where a package is initially -- installed, because other cases are covered by the *un scriptlets, @@ -29,7 +29,7 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerpostun -P 1000100 -p -- @systemunitdir@ /etc/systemd/system +%transfiletriggerpostun -P 1000100 -p -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system -- On removal, we need to run daemon-reload after any units have been -- removed. -- On upgrade, we need to run daemon-reload after any new unit files @@ -44,7 +44,7 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerpostun -P 10000 -p -- @systemunitdir@ /etc/systemd/system +%transfiletriggerpostun -P 10000 -p -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system -- We restart remaining services that should be restarted here. if posix.access("/run/systemd/system") then pid = posix.fork() @@ -55,8 +55,8 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerin -P 100700 -p -- @sysusersdir@ --- This script will process files installed in @sysusersdir@ to create +%transfiletriggerin -P 100700 -p -- {{SYSUSERS_DIR}} +-- This script will process files installed in {{SYSUSERS_DIR}} to create -- specified users automatically. The priority is set such that it -- will run before the tmpfiles file trigger. if posix.access("/run/systemd/system") then @@ -68,9 +68,9 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerin -P 1000700 udev -p -- @udevhwdbdir@ +%transfiletriggerin -P 1000700 udev -p -- {{UDEV_HWDB_DIR}} -- This script will automatically invoke hwdb update if files have been --- installed or updated in @udevhwdbdir@. +-- installed or updated in {{UDEV_HWDB_DIR}}. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then @@ -80,9 +80,9 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerin -P 1000700 -p -- @catalogdir@ +%transfiletriggerin -P 1000700 -p -- {{SYSTEMD_CATALOG_DIR}} -- This script will automatically invoke journal catalog update if files --- have been installed or updated in @catalogdir@. +-- have been installed or updated in {{SYSTEMD_CATALOG_DIR}}. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then @@ -92,20 +92,20 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerin -P 1000700 -p -- @binfmtdir@ +%transfiletriggerin -P 1000700 -p -- {{BINFMT_DIR}} -- This script will automatically apply binfmt rules if files have been --- installed or updated in @binfmtdir@. +-- installed or updated in {{BINFMT_DIR}}. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("@rootlibexecdir@/systemd-binfmt")) + assert(posix.exec("{{ROOTLIBEXECDIR}}/systemd-binfmt")) elseif pid > 0 then posix.wait(pid) end end -%transfiletriggerin -P 1000600 -p -- @tmpfilesdir@ --- This script will process files installed in @tmpfilesdir@ to create +%transfiletriggerin -P 1000600 -p -- {{TMPFILES_DIR}} +-- This script will process files installed in {{TMPFILES_DIR}} to create -- tmpfiles automatically. The priority is set such that it will run -- after the sysusers file trigger, but before any other triggers. if posix.access("/run/systemd/system") then @@ -117,9 +117,9 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerin -P 1000600 udev -p -- @udevrulesdir@ +%transfiletriggerin -P 1000600 udev -p -- {{UDEV_RULES_DIR}} -- This script will automatically update udev with new rules if files --- have been installed or updated in @udevrulesdir@. +-- have been installed or updated in {{UDEV_RULES_DIR}}. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then @@ -129,13 +129,13 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerin -P 1000500 -p -- @sysctldir@ +%transfiletriggerin -P 1000500 -p -- {{SYSCTL_DIR}} -- This script will automatically apply sysctl rules if files have been --- installed or updated in @sysctldir@. +-- installed or updated in {{SYSCTL_DIR}}. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("@rootlibexecdir@/systemd-sysctl")) + assert(posix.exec("{{ROOTLIBEXECDIR}}/systemd-sysctl")) elseif pid > 0 then posix.wait(pid) end diff --git a/src/rpm/triggers.systemd.sh.in b/src/rpm/triggers.systemd.sh.in index 0080040de4..22abad9812 100644 --- a/src/rpm/triggers.systemd.sh.in +++ b/src/rpm/triggers.systemd.sh.in @@ -9,7 +9,7 @@ # # Minimum rpm version supported: 4.14.0 -%transfiletriggerin -P 900900 -- @systemunitdir@ /etc/systemd/system +%transfiletriggerin -P 900900 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system # This script will run after any package is initially installed or # upgraded. We care about the case where a package is initially # installed, because other cases are covered by the *un scriptlets, @@ -19,7 +19,7 @@ if test -d "/run/systemd/system"; then %{_bindir}/systemctl reload-or-restart --marked || : fi -%transfiletriggerpostun -P 1000100 -- @systemunitdir@ /etc/systemd/system +%transfiletriggerpostun -P 1000100 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system # On removal, we need to run daemon-reload after any units have been # removed. # On upgrade, we need to run daemon-reload after any new unit files @@ -29,61 +29,61 @@ if test -d "/run/systemd/system"; then %{_bindir}/systemctl daemon-reload || : fi -%transfiletriggerpostun -P 10000 -- @systemunitdir@ /etc/systemd/system +%transfiletriggerpostun -P 10000 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system # We restart remaining services that should be restarted here. if test -d "/run/systemd/system"; then %{_bindir}/systemctl reload-or-restart --marked || : fi -%transfiletriggerin -P 1000700 -- @sysusersdir@ -# This script will process files installed in @sysusersdir@ to create +%transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}} +# This script will process files installed in {{SYSUSERS_DIR}} to create # specified users automatically. The priority is set such that it # will run before the tmpfiles file trigger. if test -d "/run/systemd/system"; then %{_bindir}/systemd-sysusers || : fi -%transfiletriggerin -P 1000700 udev -- @udevhwdbdir@ +%transfiletriggerin -P 1000700 udev -- {{UDEV_HWDB_DIR}} # This script will automatically invoke hwdb update if files have been -# installed or updated in @udevhwdbdir@. +# installed or updated in {{UDEV_HWDB_DIR}}. if test -d "/run/systemd/system"; then %{_bindir}/systemd-hwdb update || : fi -%transfiletriggerin -P 1000700 -- @catalogdir@ +%transfiletriggerin -P 1000700 -- {{SYSTEMD_CATALOG_DIR}} # This script will automatically invoke journal catalog update if files -# have been installed or updated in @catalogdir@. +# have been installed or updated in {{SYSTEMD_CATALOG_DIR}}. if test -d "/run/systemd/system"; then %{_bindir}/journalctl --update-catalog || : fi -%transfiletriggerin -P 1000700 -- @binfmtdir@ +%transfiletriggerin -P 1000700 -- {{BINFMT_DIR}} # This script will automatically apply binfmt rules if files have been -# installed or updated in @binfmtdir@. +# installed or updated in {{BINFMT_DIR}}. if test -d "/run/systemd/system"; then # systemd-binfmt might fail if binfmt_misc kernel module is not loaded # during install - @rootlibexecdir@/systemd-binfmt || : + {{ROOTLIBEXECDIR}}/systemd-binfmt || : fi -%transfiletriggerin -P 1000600 -- @tmpfilesdir@ -# This script will process files installed in @tmpfilesdir@ to create +%transfiletriggerin -P 1000600 -- {{TMPFILES_DIR}} +# This script will process files installed in {{TMPFILES_DIR}} to create # tmpfiles automatically. The priority is set such that it will run # after the sysusers file trigger, but before any other triggers. if test -d "/run/systemd/system"; then %{_bindir}/systemd-tmpfiles --create || : fi -%transfiletriggerin -P 1000600 udev -- @udevrulesdir@ +%transfiletriggerin -P 1000600 udev -- {{UDEV_RULES_DIR}} # This script will automatically update udev with new rules if files -# have been installed or updated in @udevrulesdir@. +# have been installed or updated in {{UDEV_RULES_DIR}}. if test -e /run/udev/control; then %{_bindir}/udevadm control --reload || : fi -%transfiletriggerin -P 1000500 -- @sysctldir@ +%transfiletriggerin -P 1000500 -- {{SYSCTL_DIR}} # This script will automatically apply sysctl rules if files have been -# installed or updated in @sysctldir@. +# installed or updated in {{SYSCTL_DIR}}. if test -d "/run/systemd/system"; then - @rootlibexecdir@/systemd-sysctl || : + {{ROOTLIBEXECDIR}}/systemd-sysctl || : fi diff --git a/src/shared/generator.c b/src/shared/generator.c index 4be1dd4ff4..3967edfa06 100644 --- a/src/shared/generator.c +++ b/src/shared/generator.c @@ -185,7 +185,7 @@ int generator_write_fsck_deps( lnk = strjoina(dir, "/" SPECIAL_LOCAL_FS_TARGET ".wants/" SPECIAL_FSCK_ROOT_SERVICE); (void) mkdir_parents(lnk, 0755); - if (symlink(SYSTEM_DATA_UNIT_PATH "/" SPECIAL_FSCK_ROOT_SERVICE, lnk) < 0) + if (symlink(SYSTEM_DATA_UNIT_DIR "/" SPECIAL_FSCK_ROOT_SERVICE, lnk) < 0) return log_error_errno(errno, "Failed to create symlink %s: %m", lnk); } else { @@ -561,7 +561,7 @@ int generator_hook_up_growfs( int generator_enable_remount_fs_service(const char *dir) { /* Pull in systemd-remount-fs.service */ return generator_add_symlink(dir, SPECIAL_LOCAL_FS_TARGET, "wants", - SYSTEM_DATA_UNIT_PATH "/" SPECIAL_REMOUNT_FS_SERVICE); + SYSTEM_DATA_UNIT_DIR "/" SPECIAL_REMOUNT_FS_SERVICE); } int generator_write_blockdev_dependency( diff --git a/src/shared/install.c b/src/shared/install.c index 407de0af5e..119980663f 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -247,7 +247,7 @@ static int path_is_vendor_or_generator(const LookupPaths *p, const char *path) { if (path_is_generator(p, rpath)) return true; - return path_equal(rpath, SYSTEM_DATA_UNIT_PATH); + return path_equal(rpath, SYSTEM_DATA_UNIT_DIR); } static const char* config_path_from_flags(const LookupPaths *paths, UnitFileFlags flags) { diff --git a/src/system-update-generator/system-update-generator.c b/src/system-update-generator/system-update-generator.c index 26874cf877..fc5aaa9bac 100644 --- a/src/system-update-generator/system-update-generator.c +++ b/src/system-update-generator/system-update-generator.c @@ -30,7 +30,7 @@ static int generate_symlink(void) { } p = strjoina(arg_dest, "/" SPECIAL_DEFAULT_TARGET); - if (symlink(SYSTEM_DATA_UNIT_PATH "/system-update.target", p) < 0) + if (symlink(SYSTEM_DATA_UNIT_DIR "/system-update.target", p) < 0) return log_error_errno(errno, "Failed to create symlink %s: %m", p); return 1;