qubes-linux-utils/initramfs-tools/qubes_vm
Marek Marczykowski-Górecki 2c696013cd
Do not use /proc/xen for detecting dom0 anymore
Phase out /proc/xen usage. Relevant device files are available in
/dev/xen. Dom0 check can be replaced with uuid check - dom0 have
well-known value of all-0.

QubesOS/qubes-issues#2540
2019-02-19 00:06:06 +01:00

22 lines
329 B
Bash
Executable File

#!/bin/sh
if grep -q '^[0-]*$' /sys/hypervisor/uuid; then
echo "Not intended for dom0"
exit 0
fi
PREREQS="dmsetup"
case "$1" in
prereqs)
echo "$PREREQS"
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/sfdisk
copy_exec /sbin/mkswap
force_load xen-blkfront
force_load dm-snapshot