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.
[ -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
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