Actually check the return value of the getlabel/getuuid calls to decide whether
to overwrite $part, not the return value of the local declaration.
---
 src/core/libs/lib-blockdevices-filesystems.sh |    6 ++++--
 src/core/libs/lib-ui-interactive.sh           |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/core/libs/lib-blockdevices-filesystems.sh 
b/src/core/libs/lib-blockdevices-filesystems.sh
index fafbd1a..c7bf47b 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -871,9 +871,11 @@ process_filesystem ()
        then
                case "$PART_ACCESS" in
                        label)
-                               local label="$(getlabel $part)" && 
part="LABEL=$label";;
+                               local label
+                               label="$(getlabel $part)" && 
part="LABEL=$label";;
                        uuid)
-                               local uuid="$(getuuid $part)" && 
part="UUID=$uuid";;
+                               local uuid
+                               uuid="$(getuuid $part)" && part="UUID=$uuid";;
                esac
                if ! grep -q "$part $fs_mountpoint $fs_type defaults 0 " 
$TMP_FSTAB 2>/dev/null #$TMP_FSTAB may not exist yet
                then
diff --git a/src/core/libs/lib-ui-interactive.sh 
b/src/core/libs/lib-ui-interactive.sh
index 6e2324a..4973e22 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -1274,10 +1274,12 @@ get_kernel_parameters() {
 
        case "$PART_ACCESS" in
                label)
-                       local label="$(getlabel $rootpart)" && \
+                       local label
+                       label="$(getlabel $rootpart)" && \
                        rootpart="/dev/disk/by-label/$label" ;;
                uuid)
-                       local uuid="$(getuuid $rootpart)" && \
+                       local uuid
+                       uuid="$(getuuid $rootpart)" && \
                        rootpart="/dev/disk/by-uuid/$uuid" ;;
        esac
 
-- 
1.7.6

Reply via email to