1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

man: Correct information on sysext masking

While I had tested that a symlink to /dev/null works to "mask" a sysext
I must have gotten something wrong and thus the instructions in
519c2f0d6b don't work. What works,
at least at the moment, is to instead have an empty directory with the
extension name under /etc/extensions/.
Correct the info in the man page and add a test for it.
This commit is contained in:
Kai Lueke 2022-08-16 12:29:12 +02:00 committed by Luca Boccassi
parent 3f3c718e79
commit 1abe15fe9d
2 changed files with 16 additions and 3 deletions

View File

@ -108,9 +108,9 @@
accessed.</para>
<para>Note that there is no concept of enabling/disabling installed system extension images: all
installed extension images are automatically activated at boot. However, you can place a symlink
to <filename>/dev/null</filename> in <filename>/etc/extensions/</filename> to "mask" an image with
the same name in a folder with lower precedence.</para>
installed extension images are automatically activated at boot. However, you can place an empty directory
named like the extension (no <filename>.raw</filename>) in <filename>/etc/extensions/</filename> to "mask"
an extension with the same name in a system folder with lower precedence.</para>
<para>A simple mechanism for version compatibility is enforced: a system extension image must carry a
<filename>/usr/lib/extension-release.d/extension-release.<replaceable>$name</replaceable></filename>

View File

@ -356,6 +356,19 @@ systemctl is-active testservice-50f.service
systemd-dissect --umount "${image_dir}/app0"
systemd-dissect --umount "${image_dir}/app1"
# Test that an extension consisting of an empty directory under /etc/extensions/ takes precedence
mkdir -p /var/lib/extensions/
ln -s /usr/share/app-nodistro.raw /var/lib/extensions/app-nodistro.raw
systemd-sysext merge
grep -q -F "MARKER=1" /usr/lib/systemd/system/some_file
systemd-sysext unmerge
mkdir -p /etc/extensions/app-nodistro
systemd-sysext merge
test ! -e /usr/lib/systemd/system/some_file
systemd-sysext unmerge
rmdir /etc/extensions/app-nodistro
rm /var/lib/extensions/app-nodistro.raw
echo OK >/testok
exit 0