]> git.pld-linux.org Git - packages/util-linux.git/commitdiff
- up
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 23 Nov 2006 14:43:21 +0000 (14:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    util-linux-blockdev.init -> 1.8

util-linux-blockdev.init

index 4193af3e8d9f662a0594cf418a3a81ff9e950c88..7515eaef8fb543825ff8cd3e708985fc5171198a 100644 (file)
 start() {
        if [ ! -f /var/lock/subsys/blockdev ]; then
                for drive in $(ls /sys/block 2> /dev/null; ls /dev/mapper 2> /dev/null); do
-                       if [ -e "/dev/${drive}" ]; then
+                       if [ [ -d "/sys/block/${drive}" -a -e "/dev/${drive}" ]; then
+                               realdrive="/dev/${drive}"
+                       elif [ -e "/dev/mapper/${drive}" ]; then
+                               realdrive="/dev/mapper/${drive}"
+                       fi
+                       if [ -n "$realdrive" ]; then
                                eval PARAMS=\$BLOCKDEV_$(echo $drive | tr - _)
                                if [ -n "${PARAMS}" ]; then
                                        show "Setting parameters for block drive %s (%s)" "$drive" "$PARAMS"
                                        busy
-                                       /sbin/blockdev ${PARAMS} /dev/${drive}
+                                       /sbin/blockdev ${PARAMS} ${realdrive}
                                        ok
                                fi
                        fi
This page took 0.025617 seconds and 4 git commands to generate.