mirror of
https://github.com/clearlinux/WALinuxAgent.git
synced 2026-09-05 13:22:05 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user