Add the new type SD_PATH_SEARCH_SYSCTL to libsystemd.
With this new type sd_path_lookup() and sd_path_lookup_strv() will
return the paths used by systemd-sysctl(1) to search the .conf files:
/etc/sysctl.d/
/run/sysctl.d/
/usr/local/lib/sysctl.d/
/usr/lib/sysctl.d/
Refer to sysctl.d(5) man page.
Note: the old type SD_PATH_SYSCTL is still available, and returns the
last path (/usr/lib/sysctl.d/).
<constant>SD_PATH_SEARCH_CONFIGURATION_FACTORY</constant>,
<constant>SD_PATH_SEARCH_STATE_FACTORY</constant>,
<constant>SD_PATH_SEARCH_CONFIGURATION</constant>,
+ <constant>SD_PATH_SEARCH_SYSCTL</constant>,
<constant>SD_PATH_SYSTEMD_UTIL</constant>,
<constant>SD_PATH_SYSTEMD_SYSTEM_UNIT</constant>,
*ret = TAKE_PTR(l);
return 0;
- }}
+ }
+
+ case SD_PATH_SEARCH_SYSCTL:
+ return strv_from_nulstr(ret, CONF_PATHS_NULSTR("sysctl.d"));
+ }
return -EOPNOTSUPP;
}
SD_PATH_USER_CREDENTIAL_STORE_ENCRYPTED,
SD_PATH_USER_SEARCH_CREDENTIAL_STORE_ENCRYPTED,
+ SD_PATH_SEARCH_SYSCTL,
+
_SD_PATH_MAX,
_SD_PATH_INVALID = UINT64_MAX
};