Skip to content

Commit

Permalink
Fix cdrom detection
Browse files Browse the repository at this point in the history
waagent is trying to detect if there's a virtual cdrom by grepping
fdisk output, except that the output is different if we're not using
en locale. Use LC_ALL=C to make sure we'll have "correct" output

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
  • Loading branch information
apatard committed Apr 9, 2013
1 parent 10c29dc commit ae14435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion waagent
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ class Agent(Util):
if os.path.exists("/dev/sr0"):
dvd = "/dev/sr0"
modloaded=False
if Run("fdisk -l " + dvd + " | grep Disk",chk_err=False):
if Run("LC_ALL=C fdisk -l " + dvd + " | grep Disk",chk_err=False):
# Is it possible to load a module for ata_piix?
retcode,krn=RunGetOutput('uname -r')
if retcode:
Expand Down

0 comments on commit ae14435

Please sign in to comment.