summaryrefslogtreecommitdiffstats
path: root/test/units/TEST-74-AUX-UTILS.detect-virt.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:27:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:27:56 +0000
commit26fde72265073b26498ce55596c0eda1bc3113b4 (patch)
tree580247f9ae59f3bb05e3b9ee52eb4fe51b63887b /test/units/TEST-74-AUX-UTILS.detect-virt.sh
parentAdding upstream version 256.5. (diff)
downloadsystemd-26fde72265073b26498ce55596c0eda1bc3113b4.tar.xz
systemd-26fde72265073b26498ce55596c0eda1bc3113b4.zip
Adding upstream version 256.6.upstream/256.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xtest/units/TEST-74-AUX-UTILS.detect-virt.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/units/TEST-74-AUX-UTILS.detect-virt.sh b/test/units/TEST-74-AUX-UTILS.detect-virt.sh
new file mode 100755
index 0000000..fe1db4d
--- /dev/null
+++ b/test/units/TEST-74-AUX-UTILS.detect-virt.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -eux
+set -o pipefail
+
+SYSTEMD_IN_CHROOT=1 systemd-detect-virt --chroot
+(! SYSTEMD_IN_CHROOT=0 systemd-detect-virt --chroot)