mirror of
https://github.com/systemd/systemd.git
synced 2025-01-06 17:18:12 +03:00
6fd3496cfd
This tmpfiles.d wants to write to sysfs, which is read-only in containers, so systemd-tmpfiles --create fails in TEST-22-TMPFILES when ran in nspawn if the selinux policy package is instealled. Mask it, as it's not our config file, we don't need it in the test.
20 lines
528 B
Bash
Executable File
20 lines
528 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
# shellcheck source=test/units/test-control.sh
|
|
. "$(dirname "$0")"/test-control.sh
|
|
|
|
if systemd-detect-virt --quiet --container; then
|
|
# This comes from the selinux package and tries to write
|
|
# some files under sysfs, which will be read-only in a container,
|
|
# so mask it. It's not our tmpfiles.d file anyway.
|
|
mkdir -p /run/tmpfiles.d/
|
|
ln -s /dev/null /run/tmpfiles.d/selinux-policy.conf
|
|
fi
|
|
|
|
run_subtests
|
|
|
|
touch /testok
|