- Timestamp:
- 08/19/09 09:51:32 (14 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/pxeconfig.py
r167 r168 58 58 import getopt 59 59 import socket 60 import ConfigParser60 #import ConfigParser 61 61 import re 62 62 63 63 # import from the sara_python_modules 64 64 import AdvancedParser 65 import pxe_global 65 from pxe_global import * 66 66 67 67 # Constants … … 226 226 cnet = string.joinfields(net[0:3], '.') 227 227 228 if options.SCRIPT_HOOK: 229 if options.DEBUG or options.DRY_RUN or options.VERBOSE: 230 print 'Executing client script hook: %s with arg: %s' %(options.SCRIPT_HOOK, addr) 231 if not options.DRY_RUN: 232 cmd = '%s %s' %(options.SCRIPT_HOOK, addr) 233 228 234 haddr = '%s%02X' %(net_2_hex(cnet, options), int(net[3])) 229 230 235 manage_links(haddr, options) 231 232 236 233 237 def add_options(p): … … 241 245 REMOVE = False, 242 246 VERSION = False, 247 SCRIPT_HOOK = False, 243 248 ) 244 249 … … 305 310 pass 306 311 312 # Only check if we have specified an pxeconfig file if we did not 313 # specify the REMOVE option 314 # 307 315 if not options.REMOVE: 308 316 if options.filename: … … 313 321 options.filename = select_pxe_configfile() 314 322 323 # ... 324 if settings['client_script_hook']: 325 options.SCRIPT_HOOK = settings['client_script_hook'] 326 315 327 if options.DEBUG: 316 328 print args, options … … 323 335 # 324 336 global PXE_CONF_DIR 325 326 configfile = '@pxeconfig_conf@' 327 settings = ReadConfig(configfile) 337 settings = ReadConfig() 328 338 329 339 try:
Note: See TracChangeset
for help on using the changeset viewer.