Comment 1 for bug 25093

Revision history for this message
Jesper Krogh (jesper) wrote :

This patch solves it.. I really cant figure out how to attach a file to the bug, so it comes inline. It handles large blockdevices wrong due to the regex expects 2 (or more) blancks between minor and blockcount and with big devices there are only one.

--- mdrun 2006-01-15 11:04:51.000000000 +0100
+++ /sbin/mdrun 2005-06-08 04:17:15.000000000 +0200
@@ -95,7 +95,7 @@

 DEVDIRESC=$(echo $DEVDIR | sed -e 's!/!\\/!g')
 if [ "$AUTOCREATE" ] ; then
- CREATECMD=$(sed -e "s/.*major.*//; s/.*\ \([:0-9:]\+\)\ \+\ \([:0-9:]\+\)\ \+[:0-9:]\+\ \+\([:a-z0-9\/:]\+\).*/if [ ! -b \3 ]; then mknod \3 b \1 \2; fi ; / ; s/\//_/g" < /proc/partitions)
+ CREATECMD=$(sed -e "s/.*major.*//; s/.*\ \([:0-9:]\+\)\ \+\ \([:0-9:]\+\)\ \+\ [:0-9:]\+\ \+\([:a-z0-9\/:]\+\).*/if [ ! -b \3 ]; then mknod \3 b \1 \2; fi ; / ; s/\//_/g" < /proc/partitions)
    export CREATECMD
    export DEVDIR
    # and we need array nodes, of course