Fix cosmetic error when "lsmod | grep ata_piix" fails to find the ata_piix.ko module

Changed:
TryLoadAtapiix() added chk_err=False to prevent error output if lsmod | grep ata_piix fails.
This commit is contained in:
Eric Gable
2013-05-15 13:10:40 -07:00
parent d6aa71d102
commit ebcf0ae76c
+2 -2
View File
@@ -1828,7 +1828,7 @@ class Agent(Util):
modloaded=False
retcode,krn=RunGetOutput('uname -r')
krn_pth='/lib/modules/'+krn.strip('\n')+'/kernel/drivers/ata/ata_piix.ko'
if Run('lsmod | grep ata_piix') == 0 :
if Run("lsmod | grep ata_piix",chk_err=False) == 0 :
Log("Module " + krn_pth + " driver for ATAPI CD-ROM is already present.")
return 0
if retcode:
@@ -1845,7 +1845,7 @@ class Agent(Util):
time.sleep(1)
# check 3 times if the mod is loaded
for i in range(3):
if Run('lsmod | grep ata_piix'):
if Run("lsmod | grep ata_piix", chk_err=False):
continue
else :
modloaded=True