diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-04-06 06:35:45 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-04-06 06:35:45 -0400 |
commit | 80301e1a4aa1a7396b2cb2d6c5d0e46b75a46a98 (patch) | |
tree | f9cef21f98d326ad4a0db2bc786905014499c221 /cloudinit | |
parent | 371561772c9073daf9033145b4b2156bc9f0e7dc (diff) | |
download | vyos-cloud-init-80301e1a4aa1a7396b2cb2d6c5d0e46b75a46a98.tar.gz vyos-cloud-init-80301e1a4aa1a7396b2cb2d6c5d0e46b75a46a98.zip |
fix bug seeding grub dpkg config when devices are named xvdX (LP: #752361)
With newer ubuntu kernels the xen block devices are named xvd[a-z][0-9]
Ie, instead of /dev/sda1 the root device is /dev/xvda1.
LP: #752361
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/CloudConfig/cc_grub_dpkg.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_grub_dpkg.py b/cloudinit/CloudConfig/cc_grub_dpkg.py index dafb43cf..b26e90e8 100644 --- a/cloudinit/CloudConfig/cc_grub_dpkg.py +++ b/cloudinit/CloudConfig/cc_grub_dpkg.py @@ -31,7 +31,8 @@ def handle(name,cfg,cloud,log,args): idevs_empty=util.get_cfg_option_str(cfg["grub-dpkg"], "grub-pc/install_devices_empty",None) - if os.path.exists("/dev/sda1") and not os.path.exists("/dev/sda"): + if (( os.path.exists("/dev/sda1") and not os.path.exists("/dev/sda") ) or + ( os.path.exists("/dev/xvda1") and not os.path.exists("/dev/xvda") )): if idevs == None: idevs="" if idevs_empty == None: idevs_empty="true" else: |