hippolyte's changes

This commit is contained in:
primardj 2024-01-23 23:31:58 +00:00
parent be1ad867db
commit 177b5cec3e

View file

@ -67,12 +67,12 @@ INIT() {
mkdir -p conf
cat << EOF > "conf/$NAME-vm_var.sh"
NAME="$NAME"
NAME="${NAME}"
VMHOSTNAME="\${NAME}-vm"
VMDRIVE="\${VMHOSTNAME}.cow"
NPROC="$NPROC"
MEMORY="$MEMORY"
FORWARD="$FORWARD"
NPROC="${NPROC}"
MEMORY="${MEMORY}"
FORWARD="${FORWARD}"
LOCATION="\${NAME}-sandbox"
EOF
chmod +x "conf/$NAME-vm_var.sh"
@ -168,6 +168,14 @@ SUPPRESS() {
fi
}
set_uefi() {
UEFI="set"
OPTION="${OPTION} \
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \
-drive if=pflash,format=raw,file=${MAIN_LOCATION}/${LOCATION}/OVMF_VARS.4m.fd"
}
# gère les paramètres
@ -222,10 +230,7 @@ for (( i=3; i<=$#; i++)); do
MEMORY="${!i#*=}"
;;
"uefi")
UEFI="set"
OPTION="$OPTION \
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \
-drive if=pflash,format=raw,file=${MAIN_LOCATION}/${LOCATION}/OVMF_VARS.4m.fd"
set_uefi
;;
esac
done
@ -233,10 +238,7 @@ done
if [ "${UEFI}" == "yes" ]
then
UEFI="set"
OPTION="$OPTION \
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \
-drive if=pflash,format=raw,file=${MAIN_LOCATION}/${LOCATION}/OVMF_VARS.4m.fd"
set_uefi
fi