Changeset 3 for trunk/pxeconfig/pxeconfigd
- Timestamp:
- 02/19/02 10:38:10 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pxeconfig/pxeconfigd
r2 r3 4 4 Date : 12 February 2002 5 5 Desc. : 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. 10 14 11 15 Note: … … 13 17 14 18 CVS info 15 $Date: 2002/02/1 8 15:02:00 $16 $Revision: 1. 1$19 $Date: 2002/02/19 09:38:10 $ 20 $Revision: 1.2 $ 17 21 """ 18 22 import time … … 22 26 import string 23 27 import syslog 28 import getopt 24 29 25 30 # DEBUG … … 32 37 STDIN=0 33 38 STDOUT=1 39 SHORTOPT_LIST='d:' 40 LONGOPT_LIST=['directory='] 34 41 35 42 PXE_CONF_DIR = '/tftpboot/pxelinux.cfg' … … 94 101 sys.exit(0) 95 102 103 def 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 96 120 97 121 def server(): 98 122 """Start the daemon 99 123 """ 124 check_args(sys.argv) 100 125 101 126 if not os.path.isdir(PXE_CONF_DIR):
Note: See TracChangeset
for help on using the changeset viewer.