[arch-commits] Commit in mdadm/trunk (PKGBUILD mdadm_hook mdadm_install)

Tobias Powalowski tpowa at archlinux.org
Fri Feb 5 19:04:52 UTC 2010


    Date: Friday, February 5, 2010 @ 14:04:52
  Author: tpowa
Revision: 67227

change to new mkinitcpio

Modified:
  mdadm/trunk/PKGBUILD
  mdadm/trunk/mdadm_hook
  mdadm/trunk/mdadm_install

---------------+
 PKGBUILD      |   12 +++++++-----
 mdadm_hook    |   26 +++++++++++++-------------
 mdadm_install |    3 ++-
 3 files changed, 22 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-02-05 12:04:08 UTC (rev 67226)
+++ PKGBUILD	2010-02-05 19:04:52 UTC (rev 67227)
@@ -2,7 +2,7 @@
 # Maintainer: Judd Vinet <jvinet at zeroflux.org>
 pkgname=mdadm
 pkgver=3.1.1
-pkgrel=1
+pkgrel=2
 pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
 arch=(i686 x86_64)
 license=('GPL')
@@ -27,12 +27,14 @@
   install -D -m755 ../mdadm $pkgdir/etc/rc.d/mdadm
   install -D -m644 ../mdadm_install $pkgdir/lib/initcpio/install/mdadm
   install -D -m644 ../mdadm_hook $pkgdir/lib/initcpio/hooks/mdadm
+  # symlink for backward compatibility
+  ln -sf /lib/initcpio/hooks/mdadm  $pkgdir/lib/initcpio/hooks/raid
   # build static mdassemble for Arch's initramfs
-  make mdassemble.auto
-  install -D -m755 mdassemble.auto $pkgdir/sbin/mdassemble.static
+  make MDASSEMBLE_AUTO=1 mdassemble
+  install -D -m755 mdassemble $pkgdir/sbin/mdassemble
 }
 md5sums=('4fd8e375a2ee314becd3196c1a250d98'
          '6df172c8f77b280018cf87eb3d313f29'
          '00cbed931db4f15b6ce49e3e7d433966'
-         '5067783b0051dedc95d159af22f0c681'
-         'ef76d9dda597ffca4ef1934fe801cb60')
+         '0c201efd85790fea6aaf7686a9b31510'
+         '055dd8c8e58afde63dc695b3e36aa5b2')

Modified: mdadm_hook
===================================================================
--- mdadm_hook	2010-02-05 12:04:08 UTC (rev 67226)
+++ mdadm_hook	2010-02-05 19:04:52 UTC (rev 67227)
@@ -14,30 +14,30 @@
         case $i in
                 # raid 
                 md=[0-9]*,/*)
-                    device="$(/bin/replace -s,/ "$i" "=" "")"
-                    array="$(/bin/replace -s/ "$device" "," " devices=")"
-                    echo "ARRAY /dev/$array" >> $mdconfig
+                    device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=||g')"
+                    array="$(echo $i | cut -d, -f2-)"
+                    echo "ARRAY /dev/$device devices=$array" >> $mdconfig
                     RAID_FOUND=1
                     ;;
                 # partitionable raid
                 md=d[0-9]*,/*)
-                    device="$(/bin/replace -s=d "$i" "md=" "md_")"
-                    array="$(/bin/replace -s/ "$device" "," " devices=")"
-                    echo "ARRAY /dev/$array" >> $mdconfig
+                    device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=|_|g')"
+                    array="$(echo $i | cut -d, -f2-)"
+                    echo "ARRAY /dev/$device devices=$array" >> $mdconfig
                     RAID_FOUND=1
                     ;;
                 # raid UUID 
                 md=[0-9]*,[0-9,a-z]*)
-                    device="$(/bin/replace -s,/ "$i" "=" "")"
-                    array="$(/bin/replace -s/ "$device" "," " uuid=")"
-                    echo "ARRAY /dev/$array" >> $mdconfig
+                    device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=||g')"
+                    array="$(echo $i | cut -d, -f2-)"
+                    echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
                     RAID_FOUND=1
                     ;;
                 # partitionable raid UUID
                 md=d[0-9]*,[0-9,a-z]*)
-                    device="$(/bin/replace -s=d "$i" "md=" "md_")"
-                    array="$(/bin/replace -s/ "$device" "," " uuid=")"
-                    echo "ARRAY /dev/$array" >> $mdconfig
+                    device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=|_|g')"
+                    array="$(echo $i | cut -d, -f2-)"
+                    echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
                     RAID_FOUND=1
                     ;;
             esac 
@@ -47,6 +47,6 @@
     fi
     if [ "$RAID_FOUND" = 1 ]; then
         # assemble everything
-        /sbin/mdassemble.static
+        /sbin/mdassemble
     fi
 }
\ No newline at end of file

Modified: mdadm_install
===================================================================
--- mdadm_install	2010-02-05 12:04:08 UTC (rev 67226)
+++ mdadm_install	2010-02-05 19:04:52 UTC (rev 67227)
@@ -3,7 +3,7 @@
 install ()
 {
     MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
-    BINARIES="mdassemble.static"
+    BINARIES="mdassemble"
     FILES=""
     SCRIPT="mdadm"
     # check if a custom mdadm.conf exists
@@ -11,6 +11,7 @@
         echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
         add_file "/etc/mdadm.conf"
     fi
+    add_file "/lib/udev/rules.d/64-md-raid.rules"
 }
 
 help ()




More information about the arch-commits mailing list