|
|
64b87c |
From ccebb4c045a7cc6c22977c9b23b95108030901ea Mon Sep 17 00:00:00 2001
|
|
|
64b87c |
From: Radek Vykydal <rvykydal@redhat.com>
|
|
|
64b87c |
Date: Tue, 13 Jan 2015 15:14:10 +0100
|
|
|
64b87c |
Subject: [PATCH] Add rd.live.overlay.size option
|
|
|
64b87c |
|
|
|
64b87c |
(cherry picked from commit 18423f7951de7b9cb4007438b58b6067aa6f2e93)
|
|
|
64b87c |
---
|
|
|
64b87c |
modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 +++-
|
|
|
64b87c |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
64b87c |
|
|
|
64b87c |
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
|
1755ca |
index 8d5476cd..6631d9a8 100755
|
|
|
64b87c |
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
|
64b87c |
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
|
64b87c |
@@ -29,6 +29,8 @@ getargbool 0 rd.live.overlay.reset -d -y reset_overlay && reset_overlay="yes"
|
|
|
64b87c |
getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay=""
|
|
|
64b87c |
overlay=$(getarg rd.live.overlay -d overlay)
|
|
|
64b87c |
getargbool 0 rd.writable.fsimg -d -y writable_fsimg && writable_fsimg="yes"
|
|
|
64b87c |
+overlay_size=$(getarg rd.live.overlay.size=)
|
|
|
64b87c |
+[ -z "$overlay_size" ] && overlay_size=512
|
|
|
64b87c |
|
|
|
64b87c |
getargbool 0 rd.live.overlay.thin && thin_snapshot="yes"
|
|
|
64b87c |
|
|
|
64b87c |
@@ -129,7 +131,7 @@ do_live_overlay() {
|
|
|
64b87c |
sleep 5
|
|
|
64b87c |
fi
|
|
|
64b87c |
|
|
|
64b87c |
- dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((512*1024)) 2> /dev/null
|
|
|
64b87c |
+ dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((overlay_size*1024)) 2> /dev/null
|
|
|
64b87c |
if [ -n "$setup" -a -n "$readonly_overlay" ]; then
|
|
|
64b87c |
RO_OVERLAY_LOOPDEV=$( losetup -f )
|
|
|
64b87c |
losetup $RO_OVERLAY_LOOPDEV /overlay
|