mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-02 16:04:52 +08:00
fix: Set network flag (#1075)
This commit is contained in:
parent
ea0d7ee6cd
commit
0f97091e61
@ -271,6 +271,7 @@ getSlirp() {
|
|||||||
|
|
||||||
configureSlirp() {
|
configureSlirp() {
|
||||||
|
|
||||||
|
NETWORK="slirp"
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Configuring slirp networking..."
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Configuring slirp networking..."
|
||||||
|
|
||||||
local ip="$IP"
|
local ip="$IP"
|
||||||
@ -302,6 +303,7 @@ configureSlirp() {
|
|||||||
|
|
||||||
configurePasst() {
|
configurePasst() {
|
||||||
|
|
||||||
|
NETWORK="passt"
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Configuring user-mode networking..."
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Configuring user-mode networking..."
|
||||||
|
|
||||||
local log="/var/log/passt.log"
|
local log="/var/log/passt.log"
|
||||||
@ -785,7 +787,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "${NETWORK,,}" in
|
case "${NETWORK,,}" in
|
||||||
"user"* | "passt" | "slirp" ) ;;
|
"passt" | "slirp" | "user"* ) ;;
|
||||||
"tap" | "tun" | "tuntap" | "y" )
|
"tap" | "tun" | "tuntap" | "y" )
|
||||||
|
|
||||||
# Configure tap interface
|
# Configure tap interface
|
||||||
@ -800,11 +802,9 @@ else
|
|||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[[ "${NETWORK,,}" == "user"* ]] && NETWORK="passt"
|
|
||||||
|
|
||||||
case "${NETWORK,,}" in
|
case "${NETWORK,,}" in
|
||||||
"tap" | "tun" | "tuntap" | "y" ) ;;
|
"tap" | "tun" | "tuntap" | "y" ) ;;
|
||||||
"passt" )
|
"passt" | "user"* )
|
||||||
|
|
||||||
# Configure for user-mode networking (passt)
|
# Configure for user-mode networking (passt)
|
||||||
if ! configurePasst; then
|
if ! configurePasst; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user