From 043fcf655138e28fe5920b8d9c389dd62ae2480f Mon Sep 17 00:00:00 2001
From: Daniil Baturin <daniil@baturin.org>
Date: Wed, 3 Oct 2018 04:39:09 +0200
Subject: T866: set the upgraded flag on update from 1.1.x

---
 .../includes.chroot/opt/vyatta/etc/install-image/postinst          | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'data/live-build-config/includes.chroot')

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
-- 
cgit v1.2.3