All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add readonly overlay support for dmsquash
@ 2010-02-26 14:44 Joey Boggs
       [not found] ` <1267195469-32522-1-git-send-email-jboggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Joey Boggs @ 2010-02-26 14:44 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Joey Boggs

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.

---
 modules.d/90dmsquash-live/dmsquash-live-root |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules.d/90dmsquash-live/dmsquash-live-root b/modules.d/90dmsquash-live/dmsquash-live-root
index acec91d..f40e048 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
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-03-04 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-26 14:44 [PATCH] add readonly overlay support for dmsquash Joey Boggs
     [not found] ` <1267195469-32522-1-git-send-email-jboggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-02-26 20:23   ` Karel Zak
     [not found]     ` <20100226202326.GG8702-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2010-03-04 13:07       ` Harald Hoyer
     [not found]         ` <4B8FB0A5.2090309-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-04 14:16           ` Karel Zak
     [not found]             ` <20100304141633.GA18077-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2010-03-04 14:28               ` Harald Hoyer
2010-03-04 13:07   ` Harald Hoyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.