arc-a: add kvmsupport check

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-02-19 19:00:24 +01:00
parent be38f4dd92
commit f95bcdbdcb

View File

@ -60,6 +60,12 @@ initConfigKey "ip" "{}" "${USER_CONFIG_FILE}"
initConfigKey "netmask" "{}" "${USER_CONFIG_FILE}"
initConfigKey "mac" "{}" "${USER_CONFIG_FILE}"
initConfigKey "static" "{}" "${USER_CONFIG_FILE}"
# KVM Check
if grep -q "^flags.*vmx.*" /proc/cpuinfo | grep -q "^flags.*svm.*" /proc/cpuinfo; then
writeConfigKey "arc.kvm" "true" "${USER_CONFIG_FILE}"
else
writeConfigKey "arc.kvm" "false" "${USER_CONFIG_FILE}"
fi
# Init Network
ETHX=$(ls /sys/class/net/ | grep -v lo) || true