]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(rootfs-block): remove support for [no]readonlyroot and fastboot
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Sun, 5 Mar 2023 02:05:14 +0000 (02:05 +0000)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sun, 31 Mar 2024 22:31:34 +0000 (18:31 -0400)
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.

modules.d/95rootfs-block/mount-root.sh

index c488b113369d83d180b5d69be6a57485e7195c54..973069b651a4860ef798b870469b9c91910d4957 100755 (executable)
@@ -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"