From 344e00cb711931536290b1b86e381c8e5b85a7d0 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 26 Sep 2011 15:02:36 -0700 Subject: Bugfix 7502: Fix "show system image" on xen images built by virt-munger. --- scripts/vyatta-boot-image.pl | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/vyatta-boot-image.pl b/scripts/vyatta-boot-image.pl index d2eb3fd..68d016f 100755 --- a/scripts/vyatta-boot-image.pl +++ b/scripts/vyatta-boot-image.pl @@ -411,14 +411,11 @@ sub curVer { # Boot command line is not formatted as it would be for a system # booted via grub2 with union mounted root filesystem. Another # possibility is that it the system is Xen booted via pygrub. - # - if (-l $XEN_DEFAULT_IMAGE) { - # On Xen/pygrub systems, we figure out the running version by - # looking at the bind mount of /boot. - $vers = `mount | awk '/on \\/boot / { print \$1 }'`; - $vers =~ s/\/live\/image\/boot\///; - chomp($vers); - } + # On Xen/pygrub systems, we figure out the running version by + # looking at the bind mount of /boot. + $vers = `mount | awk '/on \\/boot / { print \$1 }'`; + $vers =~ s/\/live\/image\/boot\///; + chomp($vers); } # In a non-image system, the kernel resides directly under "/boot". -- cgit v1.2.3