From: Laszlo Gombos Date: Sun, 5 Mar 2023 02:05:14 +0000 (+0000) Subject: fix(rootfs-block): remove support for [no]readonlyroot and fastboot X-Git-Tag: 100~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=469935fcca330c215009937eedbfb0dc15d533be;p=thirdparty%2Fdracut-ng.git fix(rootfs-block): remove support for [no]readonlyroot and fastboot This PR removes some obsolete and undocumented functionality from a core dracut module. "readonlyroot" and "noreadonlyroot" command line option are no longer supported. Use "ro" or "rw" instead. --- diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh index c488b1133..973069b65 100755 --- a/modules.d/95rootfs-block/mount-root.sh +++ b/modules.d/95rootfs-block/mount-root.sh @@ -30,22 +30,13 @@ mount_root() { fsck_ask_err done - READONLY= fsckoptions= if [ -f "$NEWROOT"/etc/sysconfig/readonly-root ]; then # shellcheck disable=SC1090 . "$NEWROOT"/etc/sysconfig/readonly-root fi - if getargbool 0 "readonlyroot=" -y readonlyroot; then - READONLY=yes - fi - - if getarg noreadonlyroot; then - READONLY=no - fi - - if [ -f "$NEWROOT"/fastboot ] || getargbool 0 fastboot; then + if [ -f "$NEWROOT"/fastboot ]; then fastboot=yes fi @@ -106,8 +97,8 @@ mount_root() { # esc_root=$(echo ${root#block:} | sed 's,\\,\\\\,g') # printf '%s %s %s %s 1 1 \n' "$esc_root" "$NEWROOT" "$rootfs" "$rflags" >/etc/fstab - if fsck_able "$rootfs" \ - && [ "$rootfsck" != "0" -a -z "$fastboot" -a "$READONLY" != "yes" ] \ + if ! getargbool 0 ro && fsck_able "$rootfs" \ + && [ "$rootfsck" != "0" -a -z "$fastboot" ] \ && ! strstr "${rflags}" _netdev \ && ! getargbool 0 rd.skipfsck; then umount "$NEWROOT"