Bug#337081: multipath-tools: bashism in /etc/udev/scripts/multipath.sh - errors in patch

Bernd Zeimetz bernd at bzed.de
Sun Nov 27 11:20:43 UTC 2005


Hi,

there're some ;; missing in the patch, also the opening ( are not sh 
compatible.

$ case "foo" in (bar) echo foo;; (*) echo bar;; esac
syntax error: `(' unexpected
$ case "foo" in bar) echo foo;; *) echo bar;; esac
bar
$                                                  

I think it was supposed to be

--- ../../unstable/multipath-tools-0.4.5/multipath/multipath.sh 2005-11-27 
11:18:51.829821192 +0100
+++ multipath.sh        2005-11-27 12:12:07.038075704 +0100
@@ -4,11 +4,14 @@
    exit
 fi

-if [ "${1:0:3}" = "dm-" ] ; then
-  dev=$(</sys${DEVPATH}/dev)
-  map=$(/sbin/devmap_name $dev)
-  /sbin/kpartx -v -a /dev/$map
-else
-  /sbin/multipath -v0 /dev/$1
-fi
+case "$1" in
+   dm-*)
+      dev=$(</sys${DEVPATH}/dev)
+      map=$(/sbin/devmap_name $dev)
+      /sbin/kpartx -v -a /dev/$map
+   ;;
+   *)
+      /sbin/multipath -v0 /dev/$1
+   ;;
+esac


Best regards,

Bernd




More information about the pkg-lvm-maintainers mailing list