Changeset 20 for trunk


Ignore:
Timestamp:
09/30/02 11:22:02 (20 years ago)
Author:
sscpbas
Message:

pxeconfig:

Changed some text and removed some obselete code.

Location:
trunk/pxeconfig
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pxeconfig/changelog

    r19 r20  
    1 Always edit this file when changes are commited::
     1Always edit this file when changes are commited:
    22
    33$Log: changelog,v $
     4Revision 1.18  2002/09/30 09:22:02  sscpbas
     5pxeconfig:
     6  Changed some text and removed some obselete code.
     7
    48Revision 1.17  2002/09/27 14:47:36  sscpbas
    59pxeconfig:
  • trunk/pxeconfig/pxeconfig

    r19 r20  
    77#
    88# CVS info
    9 #  $Date: 2002/09/27 14:47:36 $
    10 #  $Revision: 1.10 $
     9#  $Date: 2002/09/30 09:22:02 $
     10#  $Revision: 1.11 $
    1111#
    1212# Copyright (C) 2002
     
    7373END='end'
    7474
    75 SHORTOPT_LIST='d:n:s:e:f:'
    76 LONGOPT_LIST=['directory=', 'net=', 'start=', 'end=', 'file=']
     75SHORTOPT_LIST='hd:n:s:e:f:'
     76LONGOPT_LIST=['help', 'directory=', 'net=', 'start=', 'end=', 'file=']
    7777
    7878def select_pxe_configfile():
     
    220220def check_cmd_line(binfo):
    221221  if len(binfo.keys()) != 4:
    222     print 'Not enough arguments to create the links'
    223222    print __doc__
     223    print 'Not enough arguments to create the links!!'
    224224    sys.exit(1)
    225225
     
    232232def check_args(argv, binfo):
    233233  """
    234   command line option:
    235     -d|--directory <dir>
    236       Where <dir> is the directory where the pxe config files reside.
     234  This function parses the command line options:
     235    argv : a list of command line options.
     236    binfo: returning a dict with the netinfo. if used non-interactively
    237237  """
    238238  global PXE_CONF_DIR
     
    241241    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
    242242  except getopt.error, detail:
    243     print check_args.__doc__
     243    print __doc__
    244244    print detail
    245245    sys.exit(1)
     
    268268      binfo[FILENAME] = value
    269269
     270    elif opt in ['-h', '--help']:
     271      print __doc__
     272      sys.exit(0)
     273
    270274
    271275def main():
Note: See TracChangeset for help on using the changeset viewer.