[virt-install PATCH v2 13/14] virt-install: --unattended conflicts with --initrd-inject and --extra-args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As --unattended will take care of generating the install script to be
inject in the initrd and also of the kernel command line to be used
during the installation, we should not mix whatever user is passing as
--initrd-inject or --extra-args when using --unattended.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 virt-install | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/virt-install b/virt-install
index 8b1d800f..0ccd3393 100755
--- a/virt-install
+++ b/virt-install
@@ -368,6 +368,10 @@ def check_option_collisions(options, guest, installer):
         fail(_("--initrd-inject only works if specified with --location.") +
              cdrom_err)
 
+    if options.unattended:
+        if options.initrd_inject or options.extra_args:
+            fail(_("--unattended does not support --initrd-inject nor --extra-args."))
+
 
 def _show_nographics_warnings(options, guest, installer):
     if guest.devices.graphics:
@@ -487,10 +491,13 @@ def build_installer(options, guest):
             install_bootdev=install_bootdev)
     if cdrom and options.livecd:
         installer.livecd = True
-    if options.extra_args:
-        installer.extra_args = options.extra_args
-    if options.initrd_inject:
-        installer.set_initrd_injections(options.initrd_inject)
+    if options.unattended:
+        pass
+    else:
+        if options.extra_args:
+            installer.extra_args = options.extra_args
+        if options.initrd_inject:
+            installer.set_initrd_injections(options.initrd_inject)
     if options.autostart:
         installer.autostart = True
 
-- 
2.20.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux