Error checking

This commit is contained in:
Kroese 2023-04-20 04:48:00 +02:00 committed by GitHub
parent 5dc346b709
commit b07470635a

View File

@ -53,8 +53,13 @@ configureDHCP() {
mknod ${TAP_PATH} c $MAJOR $MINOR && : || ("ERROR: Cannot mknod: ${TAP_PATH}" && exit 20) mknod ${TAP_PATH} c $MAJOR $MINOR && : || ("ERROR: Cannot mknod: ${TAP_PATH}" && exit 20)
fi fi
exec 30>>$TAP_PATH if ! exec 30>>$TAP_PATH; then
exec 40>>/dev/vhost-net echo "ERROR: Please add the following docker variable: --device-cgroup-rule='c ${MAJOR}:* rwm'" && exit 21
fi
if ! exec 40>>/dev/vhost-net; then
echo "ERROR: Cannot find vhost! && exit 22
fi
NET_OPTS="-netdev tap,id=hostnet0,vhost=on,vhostfd=40,fd=30" NET_OPTS="-netdev tap,id=hostnet0,vhost=on,vhostfd=40,fd=30"
} }