[arch-commits] Commit in mdadm/trunk (mdadm_udev_install)

Dave Reisner dreisner at archlinux.org
Sat Apr 21 19:32:29 EDT 2012


    Date: Saturday, April 21, 2012 @ 19:32:29
  Author: dreisner
Revision: 156631

minor cleanup, respect $BASEDIR

Modified:
  mdadm/trunk/mdadm_udev_install

--------------------+
 mdadm_udev_install |   23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

Modified: mdadm_udev_install
===================================================================
--- mdadm_udev_install	2012-04-21 23:25:58 UTC (rev 156630)
+++ mdadm_udev_install	2012-04-21 23:32:29 UTC (rev 156631)
@@ -1,23 +1,22 @@
-# vim: set ft=sh:
+#!/bin/bash
 
-build()
-{
-    MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
-    BINARIES=""
-    FILES=""
-    SCRIPT=""
+build() {
+    MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-")"
+
     # check if a custom mdadm.conf exists
-    if grep -q ^ARRAY /etc/mdadm.conf; then
+    if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
         echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
         add_file "/etc/mdadm.conf"
     fi
-    add_binary "/sbin/mdadm"
+
+    add_binary "mdadm"
     add_file "/lib/udev/rules.d/64-md-raid.rules"
 }
 
-help ()
-{
-cat<<HELPEOF
+help() {
+  cat <<HELPEOF
   This hook loads raid arrays with udev.
 HELPEOF
 }
+
+# vim: set ft=sh ts=4 sw=4 et:



More information about the arch-commits mailing list