Skip to content

Commit

Permalink
Fix returncode bug
Browse files Browse the repository at this point in the history
Fix returncode bug
  • Loading branch information
kroese committed May 12, 2023
2 parents 3eb9d12 + d05e463 commit d540563
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion run/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ configureDHCP() {
# Create a macvtap network for the VM guest

{ ip link add link "${VM_NET_DEV}" name "${VM_NET_TAP}" address "${VM_NET_MAC}" type macvtap mode bridge ; rc=$?; } || :

if (( rc != 0 )); then
error "Cannot create macvtap interface. Please make sure the network type is 'macvlan' and not 'ipvlan',"
error "and that the NET_ADMIN capability has been added to the container config: --cap-add NET_ADMIN" && exit 16
Expand Down Expand Up @@ -62,6 +62,8 @@ configureDHCP() {
fi

NET_OPTS="-netdev tap,id=hostnet0,vhost=on,vhostfd=40,fd=30"

return 0
}

configureNAT () {
Expand Down Expand Up @@ -155,6 +157,8 @@ configureNAT () {
{ set +x; } 2>/dev/null

[[ "${DEBUG}" == [Yy1]* ]] && echo

return 0
}

# ######################################
Expand Down

0 comments on commit d540563

Please sign in to comment.