diff options
| author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-09 10:34:29 -0800 | 
|---|---|---|
| committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-09 10:34:29 -0800 | 
| commit | eda28eadc0e429150a6575f4de99ea6ea1101000 (patch) | |
| tree | 232d08d086cfcde66d8c6441e55b6d9bca425718 /scripts/install/install-functions | |
| parent | 0dbc66ed17d3a18f540d24e3e143089a7dc26f1e (diff) | |
| parent | 2dab8bb6de2faefd3a9289647a150d04116d4500 (diff) | |
| download | vyatta-cfg-system-eda28eadc0e429150a6575f4de99ea6ea1101000.tar.gz vyatta-cfg-system-eda28eadc0e429150a6575f4de99ea6ea1101000.zip | |
Merge branch 'larkspur' of suva.vyatta.com:/git/vyatta-cfg-system into larkspur
Diffstat (limited to 'scripts/install/install-functions')
| -rwxr-xr-x | scripts/install/install-functions | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/scripts/install/install-functions b/scripts/install/install-functions index 5a77a0c6..d88df618 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -281,7 +281,7 @@ is_union_install ()  # outputs the version string of the current running version.  get_cur_version ()  { -  ver=`dpkg -l | grep "^ii  vyatta-version" | awk '{print $3}'` +  ver=`dpkg-query --showformat='${Version}' --show vyatta-version`    if [ -z "$ver" ]; then        echo "UNKNOWN"    else @@ -293,19 +293,21 @@ get_cur_version ()  # being installed. this can be from live CD boot or from a ISO image file.  get_new_version ()  { -  ver_path=/opt/vyatta/etc/version +  ver_path=/var/lib/dpkg/status    ver_file=${CD_SQUASH_ROOT}${ver_path}    if [ -f "$ver_file" ]; then      # CD_SQUASH_ROOT is set up => we are installing with a specified ISO      # image file. use the version string from there. -    grep '^Version' $ver_file | awk '{ print $3 }' +    dpkg -l --root=${CD_SQUASH_ROOT} | \ +	grep "^..  vyatta-version " | awk '{print $3}'      return    fi    ver_file=${ver_path}    if is_live_cd_boot && [ -f "$ver_file" ]; then      # we are installing from a live CD boot -    grep '^Version' $ver_file | awk '{ print $3 }' +    ver=`dpkg-query --showformat='${Version}' --show vyatta-version` +    echo $ver      return    fi | 
