Package: mindi                                                                  
                                                                                
        
Version: 2.20-1                                                                 
                                                                                
        
Severity: important

Mindi has support for detecting LABEL= syntax in /etc/fstab, however it is
not working on Debian, because of path to cut(1) is not "/bin/cut" but
"/usr/bin/cut". 

So if you use LABEL= syntax, mindi does not run at all.

detailed error log is available at:
http://sourceforge.net/mailarchive/message.php?msg_id=37518492

The attached patch (which removes the hardcoded path) fixes the problem.
(and has been accepted in upstream)

-- 
Opinions above are GNU-copylefted.
--- mindi.ok2   2006-11-25 13:10:24.000000000 +0100
+++ mindi       2006-11-25 13:10:36.000000000 +0100
@@ -1357,7 +1357,7 @@
                # current_partition contains only first column of /etc/fstab
                if [ "`echo "$current_partition" | /bin/grep -i "LABEL="`" != 
"" ]; then
                        str_to_find_fmt_with=$current_partition
-                       redhat_label=`echo "$current_partition" | /bin/cut 
-d'=' -f2`
+                       redhat_label=`echo "$current_partition" | cut -d'=' -f2`
                        actual_dev=""
 
                        # 1st try, findfs - the RHEL way of finding labels and 
their partitions
@@ -1367,7 +1367,7 @@
        
                        # 2nd try : blkid, the good way for all LABEL except 
swap
                        if [ "x$actual_dev" = "x" -a -x "/sbin/blkid" ]; then
-                               actual_dev=`/sbin/blkid | /bin/grep 
"$redhat_label" | grep LABEL= | /bin/cut -d':' -f1`
+                               actual_dev=`/sbin/blkid | /bin/grep 
"$redhat_label" | grep LABEL= | cut -d':' -f1`
                                # For LVM FS it will give a /dev/dm-# which 
should then be converted
                                if [ $LVM = "v2" ] && [ "`echo $actual_dev | 
grep '/dev/dm'`" ]; then
                                        major=`/bin/ls -l $actual_dev | awk 
'{print $5}'`
@@ -1386,7 +1386,7 @@
                        # 3rd try, which works on a standard partition 
(ext2/3), but not on swap
                        # For LVM gives a /dev/mapper entry 
                        if [ "x$actual_dev" = "x" ]; then
-                               actual_dev=`/bin/mount -l | /bin/grep 
"\[$redhat_label\]" | /bin/cut -d' ' -f1`
+                               actual_dev=`/bin/mount -l | /bin/grep 
"\[$redhat_label\]" | cut -d' ' -f1`
                        fi
        
                        # 4th try, with vol_id 

Reply via email to