summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-10-03 04:39:09 +0200
committerDaniil Baturin <daniil@baturin.org>2018-10-03 04:39:09 +0200
commit043fcf655138e28fe5920b8d9c389dd62ae2480f (patch)
tree5851af40c09c8a41ae974f12d81045c8add978cd
parent0db8a780f759cffadce39d9e2e2c07eb120c5462 (diff)
downloadvyos-build-043fcf655138e28fe5920b8d9c389dd62ae2480f.tar.gz
vyos-build-043fcf655138e28fe5920b8d9c389dd62ae2480f.zip
T866: set the upgraded flag on update from 1.1.x
-rwxr-xr-xdata/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst7
1 files changed, 7 insertions, 0 deletions
diff --git a/data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst b/data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst
index d807fa9b..8511227f 100755
--- a/data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst
+++ b/data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst
@@ -5,6 +5,11 @@ source /opt/vyatta/sbin/install-functions
NEWVER=`mount | grep /mnt/inst_root`
NEWVER=${NEWVER#*upperdir=/live/image/boot/}
NEWVER=${NEWVER%/live-rw*}
+
+# For upgrading from 1.1.8 and older:
+# Set the correct disk label and create persistence configs
+# Live CD persistence settings have changed in Debian Jessie
+# and the system will not find its persistence dir otherwise
DISK_LABEL=`mount | grep /live/image | awk '{print $1}' | grep dev`
if [ -d "/live/image" ]; then
@@ -14,4 +19,6 @@ if [ -d "/live/image" ]; then
fi
rm -f /live/image/boot/"${NEWVER}"/live-rw/etc/fstab
mv /live/image/boot/"${NEWVER}"/live-rw /live/image/boot/"${NEWVER}"/rw
+
+ touch /live/image/boot/"${NEWVER}"/rw/config/.upgraded
fi