summaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2010-03-05 13:03:54 -0800
committerBob Gilligan <gilligan@vyatta.com>2010-03-05 13:07:10 -0800
commit0013ec018a8ce8616d004b98476da7b7cb426517 (patch)
tree7119f4c11fd9ea16460bcffd5351950471faf607 /scripts/install
parentf7362d6a435da0fbfb35106c0bb0bf3afcf269c6 (diff)
downloadvyatta-cfg-system-0013ec018a8ce8616d004b98476da7b7cb426517.tar.gz
vyatta-cfg-system-0013ec018a8ce8616d004b98476da7b7cb426517.zip
Bugfix 5413: Determine system version from vyatta-version package.
(cherry picked from commit 5ea1d90dbe42b0eefbc222b98b9b357b5676cb8b)
Diffstat (limited to 'scripts/install')
-rwxr-xr-xscripts/install/install-functions9
1 files changed, 5 insertions, 4 deletions
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
}