Subject: Don't assume that if dpkg is installed, we'll actually get a live-helper version number from it.

From: Chris Lamb <[email-masked]>
Date: Thu, 1 Jan 2009 21:32:38 +0000

---
 helpers/lh_config | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/helpers/lh_config b/helpers/lh_config
index 886113d..b9354e0 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -155,11 +155,11 @@ Local_arguments ()
 				# Dump version
 				if [ -x "$(which dpkg-query 2>/dev/null)" ]
 				then
-					echo "${0}: This is live-helper version $(dpkg-query -f='${Version}') --show live-helper"
-				else
-					echo "${0}: This is live-helper version ${VERSION}"
+					VERSION_DPKG="$(dpkg-query -f='${Version}' --show live-helper)"
 				fi
 
+				echo "${0}: This is live-helper version ${VERSION_DPKG:-${VERSION}}"
+
 				# Dump conffile contents
 				Print_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 
-- 
cgit v1.0