summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-09 10:34:29 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-09 10:34:29 -0800
commiteda28eadc0e429150a6575f4de99ea6ea1101000 (patch)
tree232d08d086cfcde66d8c6441e55b6d9bca425718
parent0dbc66ed17d3a18f540d24e3e143089a7dc26f1e (diff)
parent2dab8bb6de2faefd3a9289647a150d04116d4500 (diff)
downloadvyatta-cfg-system-eda28eadc0e429150a6575f4de99ea6ea1101000.tar.gz
vyatta-cfg-system-eda28eadc0e429150a6575f4de99ea6ea1101000.zip
Merge branch 'larkspur' of suva.vyatta.com:/git/vyatta-cfg-system into larkspur
-rw-r--r--debian/changelog30
-rwxr-xr-xscripts/install-system6
-rwxr-xr-xscripts/install/install-functions10
-rwxr-xr-xscripts/install/install-get-partition3
-rwxr-xr-xscripts/install/install-image8
-rwxr-xr-xscripts/install/install-image-existing4
-rwxr-xr-xscripts/install/install-postinst-new2
7 files changed, 51 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index b4134788..26ad2494 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,33 @@
+vyatta-cfg-system (0.17.17) unstable; urgency=low
+
+ * Use more reliable method for determining system version.
+
+ -- Bob Gilligan <gilligan@vyatta.com> Mon, 08 Mar 2010 17:37:20 -0800
+
+vyatta-cfg-system (0.17.16) unstable; urgency=low
+
+ * Bugfix 5416: determine system version from version of vyatta-version
+ package
+
+ -- Bob Gilligan <gilligan@vyatta.com> Mon, 08 Mar 2010 16:19:08 -0800
+
+vyatta-cfg-system (0.17.15) unstable; urgency=low
+
+ * Bugfix 5360: Get name of image from correct source.
+
+ -- Bob Gilligan <gilligan@vyatta.com> Mon, 08 Mar 2010 14:51:58 -0800
+
+vyatta-cfg-system (0.17.14) unstable; urgency=low
+
+ [ Stephen Hemminger ]
+ * Fixup xl2tpd init during install
+
+ [ Bob Gilligan ]
+ * Bugfix 5414: Use correct install root reference when copying back
+ SSH keys.
+
+ -- Bob Gilligan <gilligan@vyatta.com> Mon, 08 Mar 2010 14:17:56 -0800
+
vyatta-cfg-system (0.17.13) unstable; urgency=low
* Bugfix 5413: Determine system version from vyatta-version package.
diff --git a/scripts/install-system b/scripts/install-system
index 68584445..b17ede78 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -894,7 +894,7 @@ create_partitions() {
# $1 is the partition to install on
install_root_filesystem () {
ldrive=$1
- version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }')
+ version=`dpkg-query --showformat='${Version}' --show vyatta-version`
dpkg="/usr/bin/dpkg --force-all --root=$rootfsdir"
echo "Mounting /dev/$ldrive "
@@ -1121,7 +1121,7 @@ install_grub () {
fi
fi
- version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }')
+ version=`dpkg-query --showformat='${Version}' --show vyatta-version`
# if union install tell vyatta-grub-setup
if [ ! -z $UNION ]; then
@@ -1577,7 +1577,7 @@ if [ -n "$UNION" ]; then
# set up root for postinst
postinst_root=/mnt/postinst_root
writable_root=$rootfsdir
- version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }')
+ version=`dpkg-query --showformat='${Version}' --show vyatta-version`
rw_dir=$rootfsdir/boot/$version/live-rw
mkdir -p $postinst_root /mnt/squashfs
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
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition
index f6977850..250cec68 100755
--- a/scripts/install/install-get-partition
+++ b/scripts/install/install-get-partition
@@ -467,6 +467,9 @@ save_old_keys() {
# reset modes on keys (should already be set)
chmod 600 /mnt/ssh/*_key 2>&1
chmod 644 /mnt/ssh/*.pub 2>&1
+ echo "SSH keys have been saved."
+ else
+ echo "OK. SSH keys not saved."
fi
}
diff --git a/scripts/install/install-image b/scripts/install/install-image
index fd306aec..f717588b 100755
--- a/scripts/install/install-image
+++ b/scripts/install/install-image
@@ -211,9 +211,13 @@ else
CURVER=$(get_cur_version)
fi
NEWVER=$(get_new_version)
-if [ -z "$CURVER" ] || [ -z "$NEWVER" ]; then
- fail_exit 'Cannot find release version.'
+if [ -z "$CURVER" ] ; then
+ fail_exit 'Cannot find current release version.'
fi
+if [ -z "$NEWVER" ] ; then
+ fail_exit 'Cannot find new release version.'
+fi
+
if [ "$CURVER" == "$NEWVER" ]; then
fail_exit "Version \"$NEWVER\" is already installed."
fi
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing
index b566c1e9..86a27f3e 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 "^.. vyatta-version " | awk '{print $3}'`
+
if [ -z "$NEWVER" ]; then
failure_exit 'Cannot find new release version.'
fi
diff --git a/scripts/install/install-postinst-new b/scripts/install/install-postinst-new
index e099e030..65c6cd7f 100755
--- a/scripts/install/install-postinst-new
+++ b/scripts/install/install-postinst-new
@@ -81,7 +81,7 @@ copy_config () {
# copy ssh keys
if [ -d /mnt/ssh ]; then
echo "Copying SSH keys."
- cp -p /mnt/ssh/* $rootfsdir/etc/ssh
+ cp -p /mnt/ssh/* ${INST_ROOT}/etc/ssh
fi
}