diff options
author | Kelvium <ufh8945@gmail.com> | 2021-12-25 14:22:11 +0300 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-12-26 22:39:29 +0330 |
commit | dfb994f62da3bb566e2936639d0cdbd13b594b6e (patch) | |
tree | ada121e2a9f5ab69a7a422784d8e5eb762b5e9f3 /Meta/run.sh | |
parent | 1a27220bca77e2c92a78ed24424de3efb0dcbf52 (diff) | |
download | serenity-dfb994f62da3bb566e2936639d0cdbd13b594b6e.zip |
Meta: Don't override SERENITY_KVM_SUPPORT if it is already set
I've seen how @awesomekling changes the script to disable KVM, so
that's a useful thing to have.
An example how to use it:
SERENITY_KVM_SUPPORT='0' ./Meta/serenity.sh run x86_64
My first commit btw :^)
Diffstat (limited to 'Meta/run.sh')
-rwxr-xr-x | Meta/run.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Meta/run.sh b/Meta/run.sh index ab04595507..27e361252c 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -17,8 +17,14 @@ SCRIPT_DIR="$(dirname "${0}")" #SERENITY_PACKET_LOGGING_ARG="-object filter-dump,id=hue,netdev=breh,file=e1000.pcap" # FIXME: Enable for SERENITY_ARCH=aarch64 if on an aarch64 host? -KVM_SUPPORT="0" -[ -e /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ] && [ "$SERENITY_ARCH" != "aarch64" ] && KVM_SUPPORT="1" + +# Check if SERENITY_KVM_SUPPORT is unset +if [ -z ${SERENITY_KVM_SUPPORT+x} ]; then + KVM_SUPPORT="0" + [ -e /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ] && [ "$SERENITY_ARCH" != "aarch64" ] && KVM_SUPPORT="1" +else + KVM_SUPPORT="$SERENITY_KVM_SUPPORT" +fi [ -z "$SERENITY_BOCHS_BIN" ] && SERENITY_BOCHS_BIN="bochs" |