mirror of
https://github.com/systemd/systemd.git
synced 2025-01-27 18:04:05 +03:00
Merge pull request #17009 from poettering/rootprefix-noslash
remove duplicate slashes in systemd-path output if rootprefixdir is "/"
This commit is contained in:
commit
4b6bc95c01
@ -230,6 +230,7 @@ conf.set_quoted('SYSTEMCTL_BINARY_PATH', join_paths(rootbin
|
||||
conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
|
||||
conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge'))
|
||||
conf.set_quoted('ROOTPREFIX', rootprefixdir)
|
||||
conf.set_quoted('ROOTPREFIX_NOSLASH', rootprefixdir_noslash)
|
||||
conf.set_quoted('RANDOM_SEED_DIR', randomseeddir)
|
||||
conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
|
||||
conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', join_paths(rootlibexecdir, 'systemd-cryptsetup'))
|
||||
|
@ -11,7 +11,7 @@
|
||||
# considered deprecated (though there is no plan to remove them). New names
|
||||
# shall have underscores.
|
||||
|
||||
prefix=@prefix@
|
||||
prefix=/usr
|
||||
root_prefix=@rootprefix_noslash@
|
||||
rootprefix=${root_prefix}
|
||||
sysconf_dir=@sysconfdir@
|
||||
@ -26,10 +26,10 @@ systemdsystemunitdir=${systemd_system_unit_dir}
|
||||
systemd_system_preset_dir=${rootprefix}/lib/systemd/system-preset
|
||||
systemdsystempresetdir=${systemd_system_preset_dir}
|
||||
|
||||
systemd_user_unit_dir=${prefix}/lib/systemd/user
|
||||
systemd_user_unit_dir=/usr/lib/systemd/user
|
||||
systemduserunitdir=${systemd_user_unit_dir}
|
||||
|
||||
systemd_user_preset_dir=${prefix}/lib/systemd/user-preset
|
||||
systemd_user_preset_dir=/usr/lib/systemd/user-preset
|
||||
systemduserpresetdir=${systemd_user_preset_dir}
|
||||
|
||||
systemd_system_conf_dir=${sysconfdir}/systemd/system
|
||||
@ -47,7 +47,7 @@ systemduserunitpath=${systemd_user_unit_path}
|
||||
systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
|
||||
systemdsystemgeneratordir=${systemd_system_generator_dir}
|
||||
|
||||
systemd_user_generator_dir=${prefix}/lib/systemd/user-generators
|
||||
systemd_user_generator_dir=/usr/lib/systemd/user-generators
|
||||
systemdusergeneratordir=${systemd_user_generator_dir}
|
||||
|
||||
systemd_system_generator_path=/run/systemd/system-generators:/etc/systemd/system-generators:/usr/local/lib/systemd/system-generators:${systemd_system_generator_dir}
|
||||
@ -62,7 +62,7 @@ systemdsleepdir=${systemd_sleep_dir}
|
||||
systemd_shutdown_dir=${root_prefix}/lib/systemd/system-shutdown
|
||||
systemdshutdowndir=${systemd_shutdown_dir}
|
||||
|
||||
tmpfiles_dir=${prefix}/lib/tmpfiles.d
|
||||
tmpfiles_dir=/usr/lib/tmpfiles.d
|
||||
tmpfilesdir=${tmpfiles_dir}
|
||||
|
||||
sysusers_dir=${rootprefix}/lib/sysusers.d
|
||||
@ -77,7 +77,7 @@ binfmtdir=${binfmt_dir}
|
||||
modules_load_dir=${rootprefix}/lib/modules-load.d
|
||||
modulesloaddir=${modules_load_dir}
|
||||
|
||||
catalog_dir=${prefix}/lib/systemd/catalog
|
||||
catalog_dir=/usr/lib/systemd/catalog
|
||||
catalogdir=${catalog_dir}
|
||||
|
||||
system_uid_max=@systemuidmax@
|
||||
|
@ -321,7 +321,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return from_user_dir("XDG_DESKTOP_DIR", buffer, ret);
|
||||
|
||||
case SD_PATH_SYSTEMD_UTIL:
|
||||
*ret = ROOTPREFIX "/lib/systemd";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_UNIT:
|
||||
@ -329,7 +329,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_PRESET:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-preset";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/system-preset";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_UNIT:
|
||||
@ -337,7 +337,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_PRESET:
|
||||
*ret = ROOTPREFIX "/lib/systemd/user-preset";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/user-preset";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_CONF:
|
||||
@ -357,33 +357,31 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SLEEP:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-sleep";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/system-sleep";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SHUTDOWN:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-shutdown";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/system-shutdown";
|
||||
return 0;
|
||||
|
||||
/* FIXME: systemd.pc uses ${prefix}, but CONF_PATHS_NULSTR doesn't.
|
||||
* Should ${prefix} use in systemd.pc be removed? */
|
||||
case SD_PATH_TMPFILES:
|
||||
*ret = "/usr/lib/tmpfiles.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSUSERS:
|
||||
*ret = ROOTPREFIX "/lib/sysusers.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/sysusers.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSCTL:
|
||||
*ret = ROOTPREFIX "/lib/sysctl.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/sysctl.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_BINFMT:
|
||||
*ret = ROOTPREFIX "/lib/binfmt.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/binfmt.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_MODULES_LOAD:
|
||||
*ret = ROOTPREFIX "/lib/modules-load.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/modules-load.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_CATALOG:
|
||||
|
Loading…
x
Reference in New Issue
Block a user