Changeset 55 for trunk


Ignore:
Timestamp:
09/26/05 10:41:25 (19 years ago)
Author:
bas
Message:

pxeconfig:

  • Version 0.6.1
  • Fixed an error for interactive mode
  • Added -i/--interactive mode Suggested by: Walter de Jong
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pxeconfig/pxeconfig

    r53 r55  
    7878VERSION='0.6'
    7979REMOVE='remove'
    80 
    81 SHORTOPT_LIST='hVd:n:s:e:f:r'
    82 LONGOPT_LIST=['help', 'version', 'directory=', 'net=', 'start=', 'end=', 'file=', 'remove', 'debug']
     80INTERACTIVE='interactive'
     81
     82SHORTOPT_LIST='hVd:n:s:e:f:ri'
     83LONGOPT_LIST=['help', 'version', 'directory=', 'net=', 'start=', 'end=', 'file=', 'remove', 'debug' , 'interactive' ]
    8384
    8485def select_pxe_configfile():
     
    261262  #
    262263  for opt,value in opts:
     264
    263265    if opt in ['-d', '--directory']:
    264266      if os.path.isdir(value):
     
    267269        print 'Directory %s does not exists\n' %value
    268270        sys.exit(1)
     271
     272    elif opt in ['-i', '--interactive']:
     273      binfo[INTERACTIVE] = 1
    269274
    270275    elif opt in ['-n', '--net']:
     
    335340        hosts_links(hostnames,bootinfo)
    336341  else:
    337         if bootinfo:   
     342        if bootinfo.has_key(INTERACTIVE):   
     343                interactive(bootinfo)
     344        else:
    338345                check_cmd_line(bootinfo)
    339         else:
    340                 interactive(bootinfo)
    341346        manage_links(bootinfo)
    342347
Note: See TracChangeset for help on using the changeset viewer.