diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-02-18 18:02:56 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-03-08 14:50:43 -0800 |
commit | 11e6561d93f7c648a920a4451ce25d5c9b78fc85 (patch) | |
tree | 0e1822c49079d21fb4616c28a53ab6bd630b21c8 /scripts/install/install-image-existing | |
parent | f3d4ada6e65846e7ed803733a08f5354afcf8763 (diff) | |
download | vyatta-cfg-system-11e6561d93f7c648a920a4451ce25d5c9b78fc85.tar.gz vyatta-cfg-system-11e6561d93f7c648a920a4451ce25d5c9b78fc85.zip |
Bugfix 5360: Get name of image from correct source.
The name of a system image is supposed to match the Vyatta version
string. Previously, the install-image script determined the name of
the image being installed by parsing a field in the Vyatta version
file on the image being installed. But the format of that file has
changed, and may change again the future, so it is not a good source
of the Vyatta version string. The most accurate way to determine the
Vyatta version string is to look up the debian package version string
associated with the vyatta-version package on the image being
installed. This changes the install-image script to get the system
image name that way.
(cherry picked from commit e1864411c77e688b1b67de40441550b1f1eba055)
Diffstat (limited to 'scripts/install/install-image-existing')
-rwxr-xr-x | scripts/install/install-image-existing | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index b566c1e9..1514d0a1 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -32,8 +32,8 @@ if [ -z "$CURVER" ]; then fi # get new version string. this is from the squashfs image. -NEWVER=$(grep '^Version ' ${CD_SQUASH_ROOT}${vyatta_sysconfdir}/version \ - | tr -s ' ' | cut -d ' ' -f 3) +NEWVER=`dpkg -l --root=${CD_SQUASH_ROOT} | grep "^ii vyatta-version" | awk '{print $3}'` + if [ -z "$NEWVER" ]; then failure_exit 'Cannot find new release version.' fi |