]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Add rd.live.overlay.size option
authorRadek Vykydal <rvykydal@redhat.com>
Tue, 13 Jan 2015 14:14:10 +0000 (15:14 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 3 Jul 2015 12:16:48 +0000 (14:16 +0200)
(cherry picked from commit 18423f7951de7b9cb4007438b58b6067aa6f2e93)

modules.d/90dmsquash-live/dmsquash-live-root.sh

index 8d5476cd7db2ec34bd4a1e476e58265eacf2313b..6631d9a874a3492ba53f16585bd74dcd34dabe05 100755 (executable)
@@ -29,6 +29,8 @@ getargbool 0 rd.live.overlay.reset -d -y reset_overlay && reset_overlay="yes"
 getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay=""
 overlay=$(getarg rd.live.overlay -d overlay)
 getargbool 0 rd.writable.fsimg -d -y writable_fsimg && writable_fsimg="yes"
+overlay_size=$(getarg rd.live.overlay.size=)
+[ -z "$overlay_size" ] && overlay_size=512
 
 getargbool 0 rd.live.overlay.thin && thin_snapshot="yes"
 
@@ -129,7 +131,7 @@ do_live_overlay() {
             sleep 5
         fi
 
-        dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((512*1024)) 2> /dev/null
+        dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((overlay_size*1024)) 2> /dev/null
         if [ -n "$setup" -a -n "$readonly_overlay" ]; then
             RO_OVERLAY_LOOPDEV=$( losetup -f )
             losetup $RO_OVERLAY_LOOPDEV /overlay