From: Joey Boggs Date: Fri, 26 Feb 2010 14:44:29 +0000 (-0500) Subject: add readonly overlay support for dmsquash X-Git-Tag: 005~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7baade2b874de8f87b4200f0d8b04f73a5fd0e0e;p=thirdparty%2Fdracut-ng.git add readonly overlay support for dmsquash Adds the readonly_overlay karg for cases where the dm snapshot should be set to readonly. Use case would be a livecd that is configured to have a readonly root where filling up the dm snapshot would cause a problem. --- diff --git a/modules.d/90dmsquash-live/dmsquash-live-root b/modules.d/90dmsquash-live/dmsquash-live-root index acec91d68..f40e04870 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root +++ b/modules.d/90dmsquash-live/dmsquash-live-root @@ -20,6 +20,7 @@ live_dir=$(getarg live_dir) [ -z "$live_dir" ] && live_dir="LiveOS" getarg live_ram && live_ram="yes" getarg reset_overlay && reset_overlay="yes" +getarg readonly_overlay && readonly_overlay="--readonly" || readonly_overlay="" overlay=$(getarg overlay) # FIXME: we need to be able to hide the plymouth splash for the check really @@ -95,7 +96,7 @@ do_live_overlay() { fi # set up the snapshot - echo 0 `blockdev --getsize $BASE_LOOPDEV` snapshot $BASE_LOOPDEV $OVERLAY_LOOPDEV p 8 | dmsetup create live-rw + echo 0 `blockdev --getsize $BASE_LOOPDEV` snapshot $BASE_LOOPDEV $OVERLAY_LOOPDEV p 8 | dmsetup create $readonly_overlay live-rw } # live cd helper function