add possiblity to set network in config file
This commit is contained in:
parent
716d7e8752
commit
f55f2f1639
1 changed files with 5 additions and 2 deletions
|
@ -215,13 +215,11 @@ set_uefi() {
|
|||
set_net() {
|
||||
case "${1%:*}" in
|
||||
"nat")
|
||||
echo "add the interface ${1#*:}"
|
||||
network="${network} \
|
||||
-netdev user,id=${1#*:} \
|
||||
-device virtio-net,netdev=${1#*:}"
|
||||
;;
|
||||
"br")
|
||||
echo "add bridge ${1#*:}"
|
||||
if [ "${mac}" == "" ]
|
||||
then
|
||||
echo "error, no mac set"
|
||||
|
@ -295,6 +293,11 @@ fi
|
|||
|
||||
. "conf/$1-vm_var.sh"
|
||||
|
||||
for i in ${net}; do
|
||||
set_net "${i}"
|
||||
done
|
||||
|
||||
|
||||
for (( i=3; i<=$#; i++)); do
|
||||
case "${!i%=*}" in
|
||||
"--nproc")
|
||||
|
|
Loading…
Reference in a new issue