mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-08 19:13:41 +08:00
Compare commits
1 Commits
v7.37
...
57a902ad9f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57a902ad9f |
@@ -152,7 +152,18 @@ getUserPorts() {
|
|||||||
list="${list%% }"
|
list="${list%% }"
|
||||||
|
|
||||||
for port in $list; do
|
for port in $list; do
|
||||||
args+="hostfwd=tcp::$port-$VM_NET_IP:$port,"
|
proto="tcp"
|
||||||
|
num="$port"
|
||||||
|
|
||||||
|
if [[ "$port" == */udp ]]; then
|
||||||
|
proto="udp"
|
||||||
|
num="${port%/udp}"
|
||||||
|
elif [[ "$port" == */tcp ]]; then
|
||||||
|
proto="tcp"
|
||||||
|
num="${port%/tcp}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
args+="hostfwd=$proto::$num-$VM_NET_IP:$num,"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "${args%?}"
|
echo "${args%?}"
|
||||||
|
|||||||
Reference in New Issue
Block a user