X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FAuthenticateWithPLC.py;h=dddb5ee2a13f0dab9f43958581eb7f8761220f07;hb=07139b606dfc3c657ef7d06da25c084c1679b660;hp=bad3c16d197696de6aaf24f9f2da8fc2a02512db;hpb=7ab7e9dd797333a9fdc8604554e16e192a32144d;p=bootmanager.git diff --git a/source/steps/AuthenticateWithPLC.py b/source/steps/AuthenticateWithPLC.py index bad3c16..dddb5ee 100644 --- a/source/steps/AuthenticateWithPLC.py +++ b/source/steps/AuthenticateWithPLC.py @@ -1,8 +1,16 @@ +#!/usr/bin/python2 + +# Copyright (c) 2003 Intel Corporation +# All rights reserved. +# +# Copyright (c) 2004-2006 The Trustees of Princeton University +# All rights reserved. + + import os from Exceptions import * import BootAPI -import StartDebug AUTH_FAILURE_COUNT_FILE= "/tmp/authfailurecount" @@ -48,6 +56,13 @@ def Run( vars, log ): return 1 except BootManagerException, e: log.write( "Authentication failed: %s.\n" % e ) + except: + # This is ugly. + if vars['DISCONNECTED_OPERATION']: + vars['API_SERVER_INST']= None + return 1 + else: + raise # increment auth failure auth_failure_count= 0 @@ -71,8 +86,6 @@ def Run( vars, log ): log.write( "Maximum number of authentication failures reached.\n" ) log.write( "Canceling boot process and going into debug mode.\n" ) - StartDebug.Run( vars, log ) - raise BootManagerException, "Unable to authenticate node."