Date: Saturday, February 6, 2010 @ 12:04:00 Author: tpowa Revision: 67400
fixes for new mkinitcpio Modified: mdadm/trunk/PKGBUILD mdadm/trunk/mdadm_hook ------------+ PKGBUILD | 5 +++-- mdadm_hook | 18 +++++------------- 2 files changed, 8 insertions(+), 15 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2010-02-06 17:03:49 UTC (rev 67399) +++ PKGBUILD 2010-02-06 17:04:00 UTC (rev 67400) @@ -1,5 +1,6 @@ # $Id$ -# Maintainer: Judd Vinet <jvi...@zeroflux.org> +# Maintainer: Tobias Powalowski <tp...@archlinux.org> +# Contributor: Judd Vinet <jvi...@zeroflux.org> pkgname=mdadm pkgver=3.1.1 pkgrel=2 @@ -37,4 +38,4 @@ '6df172c8f77b280018cf87eb3d313f29' '00cbed931db4f15b6ce49e3e7d433966' '0c201efd85790fea6aaf7686a9b31510' - '055dd8c8e58afde63dc695b3e36aa5b2') + '1a3eb63832cecd6550f5b0a21d58cfdb') Modified: mdadm_hook =================================================================== --- mdadm_hook 2010-02-06 17:03:49 UTC (rev 67399) +++ mdadm_hook 2010-02-06 17:04:00 UTC (rev 67400) @@ -5,48 +5,40 @@ mdconfig="/etc/mdadm.conf" # for partitionable raid, we need to load md_mod first! modprobe md_mod 2>/dev/null - # if no config file is present create one from command line parameters - if ! [ -e $mdconfig ]; then + # If md is specified on commandline, create config file from those parameters. + if [ "$(echo $input | grep "md=")" ]; then #Create initial mdadm.conf # scan all devices in /proc/partitions echo DEVICE partitions > $mdconfig for i in $input; do - case $i in + case $i in # raid md=[0-9]*,/*) 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="$(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="$(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="$(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 done - else - RAID_FOUND=1 fi - if [ "$RAID_FOUND" = 1 ]; then - # assemble everything - /sbin/mdassemble - fi + # assemble everything + [ -e $mdconfig ] && /sbin/mdassemble } \ No newline at end of file