summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2018-11-10 17:05:03 -0700
committerSean Whitton2018-11-10 17:14:42 -0700
commit54575585fd0afd895ac522bd24926087313332db (patch)
tree3f782d82116333eba926926ed5a016a2df10ac1e
parent97597832b6a44d5daad15576f90d425487796d33 (diff)
fix generated virt-install(1) call when NoAutoStart
-rw-r--r--src/Propellor/Property/Libvirt.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Propellor/Property/Libvirt.hs b/src/Propellor/Property/Libvirt.hs
index 8c6252f1..eae63f18 100644
--- a/src/Propellor/Property/Libvirt.hs
+++ b/src/Propellor/Property/Libvirt.hs
@@ -127,9 +127,8 @@ defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
, "--disk"
, "path=" ++ imageLoc
++ ",device=disk,bus=virtio"
- , autoStartArg
, "--print-xml"
- ]
+ ] ++ autoStartArg
liftIO $ hPutStrLn fh xml
liftIO $ hClose fh
makeChange $ unlessM (defineIt t) $
@@ -161,8 +160,8 @@ defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
osVariantArg = maybe "" ("--os-variant=" ++) $ osVariant h
autoStartArg = case auto of
- AutoStart -> "--autostart"
- NoAutoStart -> ""
+ AutoStart -> ["--autostart"]
+ NoAutoStart -> []
-- ==== utility functions ====