Changeset 4


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

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

Addes some pxe config files

Location:
trunk/pxeconfig
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/pxeconfig/changelog

    r3 r4  
    11Always edit this file when changes are commited:
    22
     3$Log: changelog,v $
     4Revision 1.3  2002/02/19 09:57:40  sscpbas
     5Fixed an error in the getopt handling for the client and server.
    36
     7Addes some pxe config files
    48
    5 $Log: changelog,v $
    69Revision 1.2  2002/02/19 09:38:10  sscpbas
    710Added command line option to specifiy where the pxe config directory resides.
  • 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():
  • trunk/pxeconfig/pxeconfigd

    r3 r4  
    1717
    1818CVS info
    19   $Date: 2002/02/19 09:38:10 $
    20   $Revision: 1.2 $
     19  $Date: 2002/02/19 09:57:40 $
     20  $Revision: 1.3 $
    2121"""
    2222import time
     
    105105  Must we use another directory for the PXE configuration
    106106  """
     107  global PXE_CONF_DIR
     108
    107109  try:
    108110    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
     
    113115
    114116  if opts:
    115     opt, PXE_CONFIG_DIR = opts[0]
    116 
    117  
    118  
    119 
     117    opt, PXE_CONF_DIR = opts[0]
    120118
    121119def server():
Note: See TracChangeset for help on using the changeset viewer.