Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93241 - /lib/rcscripts/addons/dm-start.sh uses here documents; doesn't work with read-only /
Summary: /lib/rcscripts/addons/dm-start.sh uses here documents; doesn't work with rea...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-19 12:58 UTC by chia.penguin
Modified: 2005-05-19 20:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chia.penguin 2005-05-19 12:58:39 UTC
/lib/rcscripts/addons/dm-start.sh uses here documents (cmd <<<input).  Since
this is run before other filesystems get mounted (ie, a rw /tmp), the commands
that use the here documents fail on systems with a read-only /.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




--- dm-start.sh.orig    2005-05-19 19:20:08.000000000 +0000
+++ dm-start.sh 2005-05-19 19:20:48.000000000 +0000
@@ -26,14 +26,15 @@
        local x line volume=$1

        [[ -z ${volume} ]] && return 1
-
+
+       /sbin/dmsetup ls 2>/dev/null |
        while read line; do
                for x in ${line}; do
                        [[ ${x} == "${volume}" ]] && return 0
                        # We only want to check the volume name
                        break
                done
-       done <<<"$(/sbin/dmsetup ls 2>/dev/null)"
+       done

        return 1
 }
@@ -58,6 +59,7 @@
        [[ -n $(get_new_dm_volumes) ]] && \
                einfo " Setting up device-mapper volumes:"

+       get_new_dm_volumes |
        while read x; do
                [[ -n ${x} ]] || continue

@@ -73,7 +75,7 @@
                else
                        eend 0
                fi
-       done <<< "$(get_new_dm_volumes)"
+       done
 fi
Comment 1 SpanKY gentoo-dev 2005-05-19 20:54:14 UTC
fixed in cvs, thanks