defect 4496: Add feature to support the error message monitoring from installer pre script

This commit is contained in:
daniceexi 2014-12-26 06:23:36 -05:00
parent 175ac75c8e
commit 24fbf6eea0
2 changed files with 12 additions and 4 deletions

View File

@ -87,6 +87,10 @@ try:
percent = 0
count = 0
numpack = 0
pre = 0
if(os.path.isfile('/tmp/xcatpre.log')):
ilog = '/tmp/xcatpre.log'
pre = 1
if(os.path.isfile('/tmp/packaging.log')):
ilog = '/tmp/packaging.log'
if(os.path.isfile('/mnt/sysimage/root/install.log')):
@ -101,7 +105,7 @@ try:
firstline = linecache.getline(ilog,1)
line = linecache.getline(ilog,count)
linecache.clearcache()
if(line and not post):
if(line and not post and not pre):
r1 = re.compile("^Installing (\d+) ")
m1 = r1.search(firstline)
if m1:
@ -128,7 +132,7 @@ try:
else:
newline = "prep"
line = "installing " + newline
if(line and post):
if(line and post and not pre):
line = "installing " + line
if(not line):
line = "installing prep"

View File

@ -75,6 +75,10 @@ try:
percent = 0
count = 0
numpack = 0
pre = 0
if(os.path.isfile('/tmp/xcatpre.log')):
ilog = '/tmp/xcatpre.log'
pre = 1
if(os.path.isfile('/tmp/packaging.log')):
ilog = '/tmp/packaging.log'
if(os.path.isfile('/mnt/sysimage/tmp/post.log')):
@ -84,7 +88,7 @@ try:
count = len(open(ilog).readlines())
line = linecache.getline(ilog,count)
linecache.clearcache()
if(line and not post):
if(line and not post and not pre):
r2 = re.compile("Installing ([^ ]*) \((\d+)/(\d+)\)")
m2 = r2.search(line)
if m2:
@ -92,7 +96,7 @@ try:
else:
newline = "post"
line = "installing " + newline
if(line and post):
if(line and post and not pre):
line = "installing " + line
if(not line):
line = "installing prep"