HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

test/units/TEST-87-AUX-UTILS-VM.detect-virt.sh

Git blob: 251a0e891020e8072c4ec36006268d91d2ae3025

Lines 1–12 of 12

#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux
set -o pipefail
 
(! systemd-detect-virt -cq)
 
SYSTEMD_IN_CHROOT=1 systemd-detect-virt --chroot
(! SYSTEMD_IN_CHROOT=0 systemd-detect-virt --chroot)
 
unshare --mount-proc --fork --user --pid systemd-detect-virt --container