mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
test: customize /etc/os-release instead of /usr/lib/os-release
As per spec image builders can create a local /etc/os-release
with per-image IDs, so modify that one instead of the original
one in /usr/lib. For example we do this when we build debian
unstable images in mkosi.
(cherry picked from commit 2f6fe4e113
)
This commit is contained in:
parent
452cfd91fe
commit
602e12f340
@ -157,9 +157,9 @@ elif [ -f /run/TEST-82-SOFTREBOOT.touch ]; then
|
|||||||
|
|
||||||
# Copy os-release away, so that we can manipulate it and check that it is updated in the propagate
|
# Copy os-release away, so that we can manipulate it and check that it is updated in the propagate
|
||||||
# directory across soft reboots. Try to cover corner cases by truncating it.
|
# directory across soft reboots. Try to cover corner cases by truncating it.
|
||||||
mkdir -p /tmp/nextroot-lower/usr/lib
|
mkdir -p /tmp/nextroot-lower/etc
|
||||||
grep ID /etc/os-release >/tmp/nextroot-lower/usr/lib/os-release
|
grep ID /etc/os-release >/tmp/nextroot-lower/etc/os-release
|
||||||
echo MARKER=1 >>/tmp/nextroot-lower/usr/lib/os-release
|
echo MARKER=1 >>/tmp/nextroot-lower/etc/os-release
|
||||||
cmp /etc/os-release /run/systemd/propagate/.os-release-stage/os-release
|
cmp /etc/os-release /run/systemd/propagate/.os-release-stage/os-release
|
||||||
(! grep -q MARKER=1 /etc/os-release)
|
(! grep -q MARKER=1 /etc/os-release)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user