From ebcf0ae76c8fab70a6103b2992eb5ecf66938d41 Mon Sep 17 00:00:00 2001 From: Eric Gable Date: Wed, 1 May 2013 16:32:25 -0700 Subject: [PATCH] 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. --- waagent | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waagent b/waagent index dbbe2ac..1f9e0e6 100644 --- a/waagent +++ b/waagent @@ -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