[Bug 4177] "read" not working since 1.19.x

bugzilla at busybox.net bugzilla at busybox.net
Sun Oct 9 15:25:54 UTC 2011


https://bugs.busybox.net/show_bug.cgi?id=4177

--- Comment #3 from gandharva at gmx.de  ---
Sorry for late answer. I attached the config. This is the relevant part from
the mdev script:

create_symlinks() {
    DEVBASE=${MDEV:0:3} # first 3 characters
    PARTNUM=${MDEV:3}   # characters 4-
    read MODEL < /sys/block/$DEVBASE/device/model
    MODEL=${MODEL// /_} # replace ' ' with '_'
    OLDPWD=$PWD
    cd $MOUNTBASE
    if which blkid > /dev/null; then
        BLKID=$(blkid /dev/$MDEV)
        eval ${BLKID#*:}
    fi
    if [ -n "$LABEL" ]; then
        rm -f "$LABEL"
        ln -s $MDEV "$LABEL"
    fi
    if [ -n "$UUID" ]; then
        LINK="${TYPE}${TYPE:+-}${UUID}"
        rm -f "${LINK}"
        ln -s $MDEV "${LINK}"
    fi
    if [ -n "$MODEL" ]; then
        LINK="${MODEL}${PARTNUM:+-}${PARTNUM}"
        rm -f "${LINK}"
        ln -s $MDEV "${LINK}"
    fi
    BUS=""
    PORT=""
    P=$PHYSDEVPATH
    case "$P" in
    /devices/platform/cx2450x-ehci.?/usb?/?-?/?-?.?/?-?.?:?.?/host*) # hub
        PORT=${P#*.*.}    # strip off
/devices/platform/cx2450x-ehci.?/usb?/?-?/?-?
        PORT=${PORT%%/*}    # strip off /?-?.?:?.?/host*, leaving the port
        BUS="usb-${P:31:1}-hub-${PORT}"
        ;;
    /devices/platform/cx2450x-ehci.?/usb?/?-?/?-?:?.?/host*) # no hub
        BUS="usb-${P:31:1}"
        ;;
    /devices/platform/cnxt_sata?-?.?/host*)
        BUS="sata-${P:27:1}"
        ;;
    *)
        # BUS="unknown" # ignored for now
        ;;
    esac
    if [ -n "$BUS" ]; then
        LINK="${BUS}${PARTNUM:+-}${PARTNUM}"
        rm -f "${LINK}"
        ln -s $MDEV "${LINK}"
    fi

    cd $OLDPWD
}

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list