diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-03-07 18:54:50 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-03-29 16:17:56 +0200 |
commit | df78419d107662dd49892d76a745c294d7031d66 (patch) | |
tree | a4734e9dd7134b729e21dcde743fe8c7e5893bc7 /test/test-systemctl-enable.sh | |
parent | man: clarify the descriptions of aliases and linked unit files (diff) | |
download | systemd-df78419d107662dd49892d76a745c294d7031d66.tar.xz systemd-df78419d107662dd49892d76a745c294d7031d66.zip |
basic: add new variable $SYSTEMD_OS_RELEASE to override location of os-release
The test for the variable is added in test-systemctl-enable because there we
can do it almost for free, and the variable is most likely to be used with
'systemctl enable --root' anyway.
Diffstat (limited to '')
-rw-r--r-- | test/test-systemctl-enable.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/test-systemctl-enable.sh b/test/test-systemctl-enable.sh index 30ba6532e7..769341129c 100644 --- a/test/test-systemctl-enable.sh +++ b/test/test-systemctl-enable.sh @@ -518,6 +518,14 @@ check_alias z 'z' && { echo "Expected failure because %z is not known" >&2; exit # FIXME: if there's an invalid Alias=, we shouldn't preach about empty [Install] -exit 0 # yes, this is needed because the last test above fails - # TODO: repeat the tests above for presets + +: -------SYSTEMD_OS_RELEASE relative to root------------------ +# check that os-release overwriting works as expected with root +test -e "$root/etc/os-release" + +cat >"$root/etc/os-release2" <<EOF +ID='the-id2' +EOF + +SYSTEMD_OS_RELEASE="$root/etc/os-release2" check_alias o 'the-id2' |