fi
gatherData() {
- overlay=$(getarg rd.overlay -d rd.live.overlay)
+ overlay=$(getarg rd.overlay)
if [ -z "$overlay" ]; then
info "Skipping overlay creation: kernel command line parameter 'rd.overlay' is not set"
exit 0
[ -z "$GENERATOR_DIR" ] && exit 1
[ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
-getargbool 0 rd.overlay.readonly -d rd.live.overlayfs.readonly && readonly_overlay="--readonly" || readonly_overlay=""
-getargbool 0 rd.overlayfs -d rd.live.overlay.overlayfs && overlayfs="yes"
+getargbool 0 rd.overlay.readonly && readonly_overlay="--readonly" || readonly_overlay=""
+getargbool 0 rd.overlayfs && overlayfs="yes"
[ -e /xor_overlayfs ] && xor_overlayfs="yes"
[ -e /xor_readonly ] && xor_readonly="--readonly"
ROOTFLAGS="$(getarg rootflags)"
[ -z "$squash_image" ] && squash_image="squashfs.img"
getargbool 0 rd.live.ram && live_ram="yes"
-getargbool 0 rd.overlay.reset -d rd.live.overlay.reset && reset_overlay="yes"
-getargbool 0 rd.overlay.readonly -d rd.live.overlay.readonly && readonly_overlay="--readonly" || readonly_overlay=""
+getargbool 0 rd.overlay.reset && reset_overlay="yes"
+getargbool 0 rd.overlay.readonly && readonly_overlay="--readonly" || readonly_overlay=""
getargbool 0 rd.live.overlay.nouserconfirmprompt && overlay_no_user_confirm_prompt="--noprompt" || overlay_no_user_confirm_prompt=""
-overlay=$(getarg rd.overlay -d rd.live.overlay)
+overlay=$(getarg rd.overlay)
getargbool 0 rd.writable.fsimg && writable_fsimg="yes"
overlay_size=$(getarg rd.live.overlay.size=)
[ -z "$overlay_size" ] && overlay_size=32768
getargbool 0 rd.live.overlay.thin && thin_snapshot="yes"
-getargbool 0 rd.overlayfs -d rd.live.overlay.overlayfs && overlayfs="yes"
+getargbool 0 rd.overlayfs && overlayfs="yes"
# Take a path to a disk label and return the parent disk if it is a partition
# Otherwise returns the original path
[ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
-getargbool 0 rd.overlay.readonly -d rd.live.overlay.readonly && readonly_overlay="--readonly" || readonly_overlay=""
-getargbool 0 rd.overlayfs -d rd.live.overlay.overlayfs && overlayfs="yes"
+getargbool 0 rd.overlay.readonly && readonly_overlay="--readonly" || readonly_overlay=""
+getargbool 0 rd.overlayfs && overlayfs="yes"
[ -e /xor_overlayfs ] && xor_overlayfs="yes"
[ -e /xor_readonly ] && xor_readonly="--readonly"
ROOTFLAGS="$(getarg rootflags)"
}
install() {
+ inst_hook cmdline 70 "$moddir/parse-legacy-overlayfs-options.sh"
inst_hook pre-mount 01 "$moddir/prepare-overlayfs.sh"
inst_hook mount 01 "$moddir/mount-overlayfs.sh" # overlay on top of block device
inst_hook pre-pivot 00 "$moddir/prepare-overlayfs.sh" # prepare for network root (e.g. nfs)
command -v getarg > /dev/null || . /lib/dracut-lib.sh
-getargbool 0 rd.overlayfs -d rd.live.overlay.overlayfs && overlayfs="yes"
-getargbool 0 rd.overlay.readonly -d rd.live.overlayfs.readonly && readonly_overlay="--readonly" || readonly_overlay=""
-overlay=$(getarg rd.overlay -d rd.live.overlay)
+getargbool 0 rd.overlayfs && overlayfs="yes"
+getargbool 0 rd.overlay.readonly && readonly_overlay="--readonly" || readonly_overlay=""
+overlay=$(getarg rd.overlay)
[ -n "$overlayfs" ] || [ -n "$overlay" ] || return 0
--- /dev/null
+#!/bin/sh
+
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+
+set_new_option() {
+ local old="$1"
+ local new="$2"
+ local value="$3"
+
+ warn "Kernel command line option '$old' is deprecated, use '$new' instead."
+ echo "${new}${value:+=$value}" >> /run/initramfs/cmdline.d/70-overlayfs.conf
+}
+
+map_option() {
+ local old="$1"
+ local new="$2"
+
+ if getarg "$new" > /dev/null; then
+ return 0
+ fi
+
+ value=$(getarg "$old") || return 0
+ set_new_option "$old" "$new" "$value"
+}
+
+map_option rd.live.overlay rd.overlay
+map_option rd.live.overlay.overlayfs rd.overlayfs
+map_option rd.live.overlay.readonly rd.overlay.readonly
+map_option rd.live.overlay.reset rd.overlay.reset
command -v getarg > /dev/null || . /lib/dracut-lib.sh
-getargbool 0 rd.overlayfs -d rd.live.overlay.overlayfs && overlayfs="yes"
-getargbool 0 rd.overlay.reset -d rd.live.overlay.reset && reset_overlay="yes"
-overlay=$(getarg rd.overlay -d rd.live.overlay)
+getargbool 0 rd.overlayfs && overlayfs="yes"
+getargbool 0 rd.overlay.reset && reset_overlay="yes"
+overlay=$(getarg rd.overlay)
[ -n "$overlayfs" ] || [ -n "$overlay" ] || return 0