Update function temp_internet
- Use a variable for usage help string
This commit is contained in:
parent
7d4bc72dd0
commit
7fe91894d2
@ -1,9 +1,10 @@
|
|||||||
function temp_internet --description "Temporarily add or remove Internet access from a VM"
|
function temp_internet --description "Temporarily add or remove Internet access from a VM"
|
||||||
set -l action $argv[1]
|
set -l action $argv[1]
|
||||||
set -l vmid $argv[2]
|
set -l vmid $argv[2]
|
||||||
|
set -i usage_help "Usage: temp_internet {add|rm} <vmid> [ip/cidr] [gateway] [bridge] [model]"
|
||||||
|
|
||||||
if test -z "$action"
|
if test -z "$action"
|
||||||
echo "Usage: temp_internet {add|rm} <vmid> [ip/cidr] [gateway] [bridge] [model]"
|
echo "$usage_help"
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ function temp_internet --description "Temporarily add or remove Internet access
|
|||||||
restartvm $vmid
|
restartvm $vmid
|
||||||
|
|
||||||
case '*'
|
case '*'
|
||||||
echo "Usage: temp_internet {add|rm} <vmid> [ip/cidr] [gateway] [bridge] [model]"
|
echo "$usage_help"
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user