From 80301e1a4aa1a7396b2cb2d6c5d0e46b75a46a98 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 6 Apr 2011 06:35:45 -0400 Subject: 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 --- cloudinit/CloudConfig/cc_grub_dpkg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cloudinit/CloudConfig/cc_grub_dpkg.py') 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: -- cgit v1.2.3