Changeset 3


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

Added command line option to specifiy where the pxe config directory resides.
This is for client ans server side.

Added some info about the package such as a READMEE, AUTHORS and LICENSE.SARA
file.

Location:
trunk/pxeconfig
Files:
4 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/pxeconfig/changelog

    r2 r3  
    11Always edit this file when changes are commited:
    22
     3
     4
    35$Log: changelog,v $
    4 Revision 1.1  2002/02/18 15:02:00  sscpbas
    5 Initial revision
     6Revision 1.2  2002/02/19 09:38:10  sscpbas
     7Added command line option to specifiy where the pxe config directory resides.
     8This is for client ans server side.
    69
     10Added some info about the package such as a READMEE, AUTHORS and LICENSE.SARA
     11file.
     12
     13Revision 1.1.1.1  2002/02/18 15:02:00  sscpbas
     14Initial release
     15
  • trunk/pxeconfig/pxeconfig

    r2 r3  
    77#
    88# CVS info
    9 #  $Date: 2002/02/18 15:02:00 $
    10 #  $Revision: 1.1 $
     9#  $Date: 2002/02/19 09:38:10 $
     10#  $Revision: 1.2 $
    1111#
    1212"""
     
    3434import os
    3535import glob
     36import getopt
    3637
    3738# DEBUG
     
    4647START=2
    4748END=3
     49SHORTOPT_LIST='d:'
     50LONGOPT_LIST=['directory=']
    4851
    4952def choice_pxe_configfile():
     
    176179    create_links(iptable[net])
    177180
     181def check_args(argv):
     182  """
     183  Must we use another directory for the PXE configuration
     184  """
     185  try:
     186    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
     187  except getopt.error, detail:
     188    print __doc__
     189    print detail
     190    sys.exit(1)
     191
     192  if opts:
     193    opt, PXE_CONFIG_DIR = opts[0]
     194
    178195def main():
     196  check_args(sys.argv)
    179197  interactive()
    180198
  • trunk/pxeconfig/pxeconfigd

    r2 r3  
    44Date  : 12 February 2002
    55Desc. : This script is used to control how a node is booted with PXE
    6         enabled network cards. The PC boots starts and fetch a pxe
    7         config file which tells how the PC must boot. This daemon
    8         enables a client to remove his pxe-config file. It then uses
    9         the DEFAULT one.
     6        enabled network cards. The node boots and fetch a pxe
     7        config file which tells how the node must boot. This daemon
     8        enables a client to remove his/here pxe config file. With the
     9        next boot it will use the default one.
     10
     11        command line option:
     12          -d/--directory <dir>
     13            Where <dir> is the directory where the pxe config files reside.
    1014         
    1115        Note:
     
    1317
    1418CVS info
    15   $Date: 2002/02/18 15:02:00 $
    16   $Revision: 1.1 $
     19  $Date: 2002/02/19 09:38:10 $
     20  $Revision: 1.2 $
    1721"""
    1822import time
     
    2226import string
    2327import syslog
     28import getopt
    2429
    2530# DEBUG
     
    3237STDIN=0
    3338STDOUT=1
     39SHORTOPT_LIST='d:'
     40LONGOPT_LIST=['directory=']
    3441
    3542PXE_CONF_DIR = '/tftpboot/pxelinux.cfg'
     
    94101  sys.exit(0)
    95102
     103def check_args(argv):
     104  """
     105  Must we use another directory for the PXE configuration
     106  """
     107  try:
     108    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
     109  except getopt.error, detail:
     110    print __doc__
     111    print detail
     112    sys.exit(1)
     113
     114  if opts:
     115    opt, PXE_CONFIG_DIR = opts[0]
     116
     117 
     118 
     119
    96120
    97121def server():
    98122  """Start the daemon
    99123  """
     124  check_args(sys.argv)
    100125
    101126  if not os.path.isdir(PXE_CONF_DIR):
Note: See TracChangeset for help on using the changeset viewer.