summaryrefslogtreecommitdiffstats
path: root/modules.d/95rootfs-block/mount-root.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
commite6f2eaf47a177a8eca054d1d70a1b6287e8c3521 (patch)
treec5719e819a9e37df4b54affd61438f382ec38a8f /modules.d/95rootfs-block/mount-root.sh
parentAdding upstream version 060+5. (diff)
downloaddracut-e6f2eaf47a177a8eca054d1d70a1b6287e8c3521.tar.xz
dracut-e6f2eaf47a177a8eca054d1d70a1b6287e8c3521.zip
Adding upstream version 102.upstream/102
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules.d/95rootfs-block/mount-root.sh')
-rwxr-xr-xmodules.d/95rootfs-block/mount-root.sh15
1 files changed, 3 insertions, 12 deletions
diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh
index c488b11..973069b 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"