To make it consistent with other env vars, e.g. $SYSTEMD_ESP_PATH or
$SYSTEMD_XBOOTLDR_PATH.
This is useful when the root is specified by a file descriptor, instead
of a path.
* `$SYSTEMD_OS_RELEASE` — if set, use this path instead of `/etc/os-release` or
`/usr/lib/os-release`. When operating under some root (e.g. `systemctl
- --root=…`), the path is taken relative to the outside root. Only useful for
- debugging.
+ --root=…`), the path is prefixed with the root. Only useful for debugging.
* `$SYSTEMD_FSTAB` — if set, use this path instead of `/etc/fstab`. Only useful
for debugging.
e = secure_getenv("SYSTEMD_OS_RELEASE");
if (e)
- return chase(e, root, 0, ret_path, ret_fd);
+ return chase(e, root, CHASE_PREFIX_ROOT, ret_path, ret_fd);
FOREACH_STRING(path, "/etc/os-release", "/usr/lib/os-release") {
r = chase(path, root, CHASE_PREFIX_ROOT, ret_path, ret_fd);
ID='the-id2'
EOF
-SYSTEMD_OS_RELEASE="$root/etc/os-release2" check_alias o 'the-id2'
+SYSTEMD_OS_RELEASE="/etc/os-release2" check_alias o 'the-id2'