|
|
d5211c |
From 26de0ad2f0f975166fe79ef72ab08e2c03519eea Mon Sep 17 00:00:00 2001
|
|
|
d5211c |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
d5211c |
Date: Mon, 28 Mar 2022 13:25:35 +0200
|
|
|
d5211c |
Subject: [PATCH] Filesystem: fix logic for UUID/label devices with space
|
|
|
d5211c |
between parameter and UUID/label
|
|
|
d5211c |
|
|
|
d5211c |
---
|
|
|
d5211c |
heartbeat/Filesystem | 14 ++++++++++----
|
|
|
d5211c |
1 file changed, 10 insertions(+), 4 deletions(-)
|
|
|
d5211c |
|
|
|
d5211c |
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
|
|
d5211c |
index 1a90d6a42..72a1b8623 100755
|
|
|
d5211c |
--- a/heartbeat/Filesystem
|
|
|
d5211c |
+++ b/heartbeat/Filesystem
|
|
|
d5211c |
@@ -596,11 +596,11 @@ Filesystem_start()
|
|
|
d5211c |
flushbufs "$DEVICE"
|
|
|
d5211c |
# Mount the filesystem.
|
|
|
d5211c |
case "$FSTYPE" in
|
|
|
d5211c |
- none) $MOUNT $options "$DEVICE" "$MOUNTPOINT" &&
|
|
|
d5211c |
+ none) $MOUNT $options $device_opt "$DEVICE" "$MOUNTPOINT" &&
|
|
|
d5211c |
bind_mount
|
|
|
d5211c |
;;
|
|
|
d5211c |
- "") $MOUNT $options "$DEVICE" "$MOUNTPOINT" ;;
|
|
|
d5211c |
- *) $MOUNT -t "$FSTYPE" $options "$DEVICE" "$MOUNTPOINT" ;;
|
|
|
d5211c |
+ "") $MOUNT $options $device_opt "$DEVICE" "$MOUNTPOINT" ;;
|
|
|
d5211c |
+ *) $MOUNT -t "$FSTYPE" $options $device_opt "$DEVICE" "$MOUNTPOINT" ;;
|
|
|
d5211c |
esac
|
|
|
d5211c |
|
|
|
d5211c |
if [ $? -ne 0 ]; then
|
|
|
d5211c |
@@ -902,7 +902,13 @@ set_blockdevice_var() {
|
|
|
d5211c |
fi
|
|
|
d5211c |
|
|
|
d5211c |
case "$DEVICE" in
|
|
|
d5211c |
- -*) # Oh... An option to mount instead... Typically -U or -L
|
|
|
d5211c |
+ --*) # Typically --uuid or --label
|
|
|
d5211c |
+ device_opt=$(echo $DEVICE | sed -E "s/([[:blank:]]|=).*//")
|
|
|
d5211c |
+ DEVICE=$(echo $DEVICE | sed -E "s/$device_opt([[:blank:]]*|=)//")
|
|
|
d5211c |
+ ;;
|
|
|
d5211c |
+ -*) # Oh... An option to mount instead... Typically -U or -L
|
|
|
d5211c |
+ device_opt=$(echo $DEVICE | cut -c1-2)
|
|
|
d5211c |
+ DEVICE=$(echo $DEVICE | sed "s/$device_opt[[:blank:]]*//")
|
|
|
d5211c |
;;
|
|
|
d5211c |
/dev/null) # Special case for BSC
|
|
|
d5211c |
blockdevice=yes
|