From df78419d107662dd49892d76a745c294d7031d66 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 7 Mar 2022 18:54:50 +0100 Subject: 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. --- test/test-systemctl-enable.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test/test-systemctl-enable.sh') 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" <