summaryrefslogtreecommitdiff
path: root/scripts/install/install-image-new
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-06-24 12:50:17 +0200
committerDaniil Baturin <daniil@baturin.org>2018-06-24 12:50:17 +0200
commitbacecf80ea16d3cd30dc7c98c98af013b2adc258 (patch)
tree2b1d6f48708ace28ae4f6c9893ee50f6f390c6b7 /scripts/install/install-image-new
parent0d8e75e2e808ccf366a1527647a6353c09d92237 (diff)
parent0f19dc57ed6588c083eee8aa9aee09b92b441b08 (diff)
downloadvyatta-cfg-system-lithium.tar.gz
vyatta-cfg-system-lithium.zip
Merge branch 'current' into lithiumlithium
Conflicts: debian/changelog scripts/snmp/vyatta-snmp-v3.pl scripts/snmp/vyatta-snmp.pl templates/interfaces/tunnel/node.def templates/system/sysctl/custom/node.def
Diffstat (limited to 'scripts/install/install-image-new')
-rwxr-xr-xscripts/install/install-image-new11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new
index 7965b939..d6427500 100755
--- a/scripts/install/install-image-new
+++ b/scripts/install/install-image-new
@@ -62,8 +62,10 @@ echo "OK. This image will be named: $image_name"
# make the dir for the new version
mkdir -p $WRITE_ROOT/boot/$image_name
# make dir for backing store
-rw_dir=$WRITE_ROOT/boot/$image_name/live-rw
+rw_dir=$WRITE_ROOT/boot/$image_name/rw
mkdir -p $rw_dir
+work_dir=$WRITE_ROOT/boot/$image_name/work
+mkdir -p $work_dir
echo Copying squashfs image...
# these are the defaults if installing from a specified ISO image file.
@@ -73,7 +75,7 @@ boot_dir=${CD_SQUASH_ROOT}/boot
boot_files=$(find $boot_dir -maxdepth 1 -type f -o -type l 2>/dev/null)
if [ ! -f "$squash_img" ] || [ -z "$boot_files" ]; then
# maybe installing from a live CD boot?
- squash_img=/live/image/live/filesystem.squashfs
+ squash_img=/lib/live/mount/medium/live/filesystem.squashfs
boot_dir=/boot
boot_files=$(find $boot_dir -maxdepth 1 -type f -o -type l 2>/dev/null)
if [ ! -f "$squash_img" ] || [ -z "$boot_files" ]; then
@@ -88,13 +90,16 @@ cp -p $squash_img $target_squash
echo Copying kernel and initrd images...
cp -dp $boot_files $WRITE_ROOT/boot/$image_name/
+# create persistence.conf file
+echo "/ union" > $WRITE_ROOT/persistence.conf
+
# set up union root for postinst
mkdir -p $INST_ROOT $READ_ROOT
if ! try_mount "-o loop,ro -t squashfs $target_squash $READ_ROOT"; then
echo 'Exiting...'
exit 1
fi
-margs=$(gen_mopts "overlayfs" $rw_dir $READ_ROOT $INST_ROOT)
+margs=$(gen_mopts "overlay" $rw_dir $READ_ROOT $work_dir $INST_ROOT)
if ! try_mount "$margs"; then
echo 'Exiting...'
exit 1