diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-03-05 13:03:54 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-03-05 13:03:54 -0800 |
commit | 5ea1d90dbe42b0eefbc222b98b9b357b5676cb8b (patch) | |
tree | abad9379111d90fd87c67b316e73ca658b646e8e /scripts | |
parent | b6f6014919e7d56156797d3e37f4931684d4e927 (diff) | |
download | vyatta-cfg-system-5ea1d90dbe42b0eefbc222b98b9b357b5676cb8b.tar.gz vyatta-cfg-system-5ea1d90dbe42b0eefbc222b98b9b357b5676cb8b.zip |
Bugfix 5413: Determine system version from vyatta-version package.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install/install-functions | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions index a50b0f56..3f85e75b 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 } |