From 0013ec018a8ce8616d004b98476da7b7cb426517 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Fri, 5 Mar 2010 13:03:54 -0800 Subject: Bugfix 5413: Determine system version from vyatta-version package. (cherry picked from commit 5ea1d90dbe42b0eefbc222b98b9b357b5676cb8b) --- scripts/install/install-functions | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'scripts/install') diff --git a/scripts/install/install-functions b/scripts/install/install-functions index 7f1269bb..5a77a0c6 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -281,10 +281,11 @@ is_union_install () # outputs the version string of the current running version. get_cur_version () { - local ver_file=/opt/vyatta/etc/version - if [ -f "$ver_file" ]; then - grep '^Version' $ver_file | awk '{ print $3 }' - return + ver=`dpkg -l | grep "^ii vyatta-version" | awk '{print $3}'` + if [ -z "$ver" ]; then + echo "UNKNOWN" + else + echo $ver fi } -- cgit v1.2.3