Ignore:
Timestamp:
02/19/02 10:57:40 (21 years ago)
Author:
sscpbas
Message:

Fixed an error in the getopt handling for the client and server.

Addes some pxe config files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pxeconfig/pxeconfig

    r3 r4  
    77#
    88# CVS info
    9 #  $Date: 2002/02/19 09:38:10 $
    10 #  $Revision: 1.2 $
     9#  $Date: 2002/02/19 09:57:40 $
     10#  $Revision: 1.3 $
    1111#
    1212"""
     
    4242# Constants
    4343#
    44 PXE_CONFIG_DIR='/tftpboot/pxelinux.cfg'
     44PXE_CONF_DIR='/tftpboot/pxelinux.cfg'
    4545NADDR=0
    4646PXEFILE=1
     
    5555  """
    5656
    57   os.chdir(PXE_CONFIG_DIR)
     57  os.chdir(PXE_CONF_DIR)
    5858
    5959  # Try to determine to which default file point to and
     
    9797def create_links(list):
    9898  """
    99   Create the links in the PXE_CONFIG_DIR,
     99  Create the links in the PXE_CONF_DIR,
    100100    list : A list containing: network hex addres, pxe config file,
    101101           start number, end number
    102102  """
    103   os.chdir(PXE_CONFIG_DIR)
     103  os.chdir(PXE_CONF_DIR)
    104104  naddr = list[NADDR]
    105105  pxe_filename = list[PXEFILE]
     
    183183  Must we use another directory for the PXE configuration
    184184  """
     185  global PXE_CONF_DIR
    185186  try:
    186187    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
     
    191192
    192193  if opts:
    193     opt, PXE_CONFIG_DIR = opts[0]
     194    opt, PXE_CONF_DIR = opts[0]
     195
     196  if not os.path.isdir(PXE_CONF_DIR):
     197    print 'Directory %s does not exists' %PXE_CONF_DIR
     198    sys.exit(1)
    194199
    195200def main():
Note: See TracChangeset for help on using the changeset viewer.