SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
43
sysutils/salt/patches/patch-salt_modules_vmctl_py
Normal file
43
sysutils/salt/patches/patch-salt_modules_vmctl_py
Normal file
|
@ -0,0 +1,43 @@
|
|||
Fix order of argument for vmctl(8)
|
||||
https://github.com/saltstack/salt/pull/57984
|
||||
|
||||
Index: salt/modules/vmctl.py
|
||||
--- salt/modules/vmctl.py.orig
|
||||
+++ salt/modules/vmctl.py
|
||||
@@ -60,7 +60,7 @@ def create_disk(name, size):
|
||||
salt '*' vmctl.create_disk /path/to/disk.img size=10G
|
||||
"""
|
||||
ret = False
|
||||
- cmd = "vmctl create {} -s {}".format(name, size)
|
||||
+ cmd = "vmctl create -s {} {}".format(size, name)
|
||||
|
||||
result = __salt__["cmd.run_all"](cmd, output_loglevel="trace", python_shell=False)
|
||||
|
||||
@@ -220,12 +220,7 @@ def start(
|
||||
|
||||
if not (name or id):
|
||||
raise SaltInvocationError('Must provide either "name" or "id"')
|
||||
- elif name:
|
||||
- cmd.append(name)
|
||||
- else:
|
||||
- cmd.append(id)
|
||||
- name = _id_to_name(id)
|
||||
-
|
||||
+
|
||||
if nics > 0:
|
||||
cmd.append("-i {}".format(nics))
|
||||
|
||||
@@ -251,6 +246,13 @@ def start(
|
||||
|
||||
if disks:
|
||||
cmd.extend(["-d", x] for x in disks)
|
||||
+
|
||||
+ if name:
|
||||
+ cmd.append(name)
|
||||
+ else:
|
||||
+ cmd.append(id)
|
||||
+ name = _id_to_name(id)
|
||||
+ log.warning(f'cmd: {cmd}')
|
||||
|
||||
# Before attempting to define a new VM, make sure it doesn't already exist.
|
||||
# Otherwise return to indicate nothing was changed.
|
Loading…
Add table
Add a link
Reference in a new issue