r160 - multipath-tools/trunk/multipath

Bastian Blank waldi at costa.debian.org
Mon Sep 19 13:13:04 UTC 2005


Author: waldi
Date: Mon Sep 19 13:13:04 2005
New Revision: 160

Added:
   multipath-tools/trunk/multipath/multipath.sh
      - copied, changed from r144, multipath-tools/trunk/multipath/multipath.dev
Removed:
   multipath-tools/trunk/multipath/multipath.dev
Modified:
   multipath-tools/trunk/multipath/Makefile
   multipath-tools/trunk/multipath/multipath.rules
Log:
* multipath/Makefile: Update.
* multipath/multipath.rules
  - Call multipath.sh.
  - Don't longer generate devices in /dev.
* multipath/multipath.sh
  - Move from multipath/multipath.dev.
  - Use udev supplied variables.


Modified: multipath-tools/trunk/multipath/Makefile
==============================================================================
--- multipath-tools/trunk/multipath/Makefile	(original)
+++ multipath-tools/trunk/multipath/Makefile	Mon Sep 19 13:13:04 2005
@@ -43,10 +43,9 @@
 install:
 	install -d $(DESTDIR)$(bindir)
 	install -m 755 $(EXEC) $(DESTDIR)$(bindir)/
-	install -d $(DESTDIR)/etc/dev.d/block/
-	install -m 755 multipath.dev $(DESTDIR)/etc/dev.d/block/
-	install -d $(DESTDIR)/etc/udev/rules.d
-	install -m 755 multipath.rules $(DESTDIR)/etc/udev/rules.d/
+	install -d $(DESTDIR)/etc/udev/scripts/
+	install -m 755 multipath.sh $(DESTDIR)/etc/udev/scripts
+	install -m 644 multipath.rules $(DESTDIR)/etc/udev/
 	install -d $(DESTDIR)$(mandir)
 	install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
 

Modified: multipath-tools/trunk/multipath/multipath.rules
==============================================================================
--- multipath-tools/trunk/multipath/multipath.rules	(original)
+++ multipath-tools/trunk/multipath/multipath.rules	Mon Sep 19 13:13:04 2005
@@ -1,3 +1 @@
-# multipath wants the devmaps presented as meaninglful device names
-# so name them after their devmap name
-KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
+SUBSYSTEM=="block", ACTION=="add", RUN+="/etc/udev/scripts/multipath.sh %k"

Copied: multipath-tools/trunk/multipath/multipath.sh (from r144, multipath-tools/trunk/multipath/multipath.dev)
==============================================================================
--- multipath-tools/trunk/multipath/multipath.dev	(original)
+++ multipath-tools/trunk/multipath/multipath.sh	Mon Sep 19 13:13:04 2005
@@ -1,13 +1,14 @@
 #!/bin/sh -e
 
 if [ ! "${ACTION}" = add ] ; then
-	exit
+   exit
 fi
 
-if [ "${DEVPATH:7:3}" = "dm-" ] ; then
-	dev=$(</sys${DEVPATH}/dev)
-	map=$(/sbin/devmap_name $dev)
-	/sbin/kpartx -v -a /dev/$map
+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 ${DEVNAME}
+  /sbin/multipath -v0 /dev/$1
 fi
+



More information about the pkg-lvm-commits mailing list