From f50d1e37a207eb181924158b6e52e49ce72c8776 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Thu, 7 Feb 2019 16:26:06 +0100 Subject: [PATCH] Only run xen-toolstack helper script if both, xm and xl are present Avoids warning about deprecated helper script. --- NEWS.markdown | 2 ++ debian/changelog | 2 ++ lib/Xen/Tools/Common.pm | 7 ++++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS.markdown b/NEWS.markdown index 8612683..c136eef 100644 --- a/NEWS.markdown +++ b/NEWS.markdown @@ -38,6 +38,8 @@ Other Changes `deb.debian.org` except those for the `debian-archive`. The latter now point to `archive.debian.org` directly. * Many improvements for the release-testing script. +* Only run xen-toolstack helper script if both, xm and xl are + present. Avoids warning about deprecated helper script. xen-tools 4.7 (released 23 Jan 2017) diff --git a/debian/changelog b/debian/changelog index df10c23..b37beac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,8 @@ xen-tools (4.8-1) UNRELEASED; urgency=medium + Drop pygrub path detection from xm.tmpl, Xen prefers a path-less bootloader='pygrub'. + Many improvements for the release-testing script. + + Only run xen-toolstack helper script if both, xm and xl are + present. Avoids warning about deprecated helper script. [ Nico Boehr ] + Add support for LVM thin provisioning. diff --git a/lib/Xen/Tools/Common.pm b/lib/Xen/Tools/Common.pm index 687326d..2b6956a 100644 --- a/lib/Xen/Tools/Common.pm +++ b/lib/Xen/Tools/Common.pm @@ -161,18 +161,19 @@ sub findXenToolstack { my $helper = '/usr/lib/xen-common/bin/xen-toolstack'; - if (-x $helper) { + my $xm = which('xm'); + my $xl = which('xl'); + + if ($xm and $xl and -x $helper) { my $toolstack = `$helper`; chomp($toolstack); return $toolstack if $toolstack; } - my $xm = which('xm'); if ($xm and system("$xm list >/dev/null 2>/dev/null") == 0) { return $xm; } - my $xl = which('xl'); if ($xl and system("$xl list >/dev/null 2>/dev/null") == 0) { return $xl; }