Revision 297ddce9 scripts/gnt-instance

b/scripts/gnt-instance
559 559
  else:
560 560
    os_name = opts.os
561 561

  
562
  # third, get confirmation: multi-reinstall requires --force-multi
563
  # *and* --force, single-reinstall just --force
562
  # third, get confirmation: multi-reinstall requires --force-multi,
563
  # single-reinstall either --force or --force-multi (--force-multi is
564
  # a stronger --force)
564 565
  multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1
565 566
  if multi_on:
566 567
    warn_msg = "Note: this will remove *all* data for the below instances!\n"
567
    if not ((opts.force_multi and opts.force) or
568
    if not (opts.force_multi or
568 569
            _ConfirmOperation(inames, "reinstall", extra=warn_msg)):
569 570
      return 1
570 571
  else:
571
    if not opts.force:
572
    if not (opts.force or opts.force_multi):
572 573
      usertext = ("This will reinstall the instance %s and remove"
573 574
                  " all data. Continue?") % inames[0]
574 575
      if not AskUser(usertext):

Also available in: Unified diff