[arch-commits] Commit in mdadm/trunk (PKGBUILD mdadm_hook)
Date: Sunday, February 7, 2010 @ 03:36:41 Author: tpowa Revision: 67446 added sleep 0.5 for safety Modified: mdadm/trunk/PKGBUILD mdadm/trunk/mdadm_hook + PKGBUILD | 11 +-- mdadm_hook |6 +- 2 files changed, 10 insertions(+), 7 deletions(-) Modified: PKGBUILD === --- PKGBUILD2010-02-07 08:31:20 UTC (rev 67445) +++ PKGBUILD2010-02-07 08:36:41 UTC (rev 67446) @@ -18,7 +18,11 @@ mdadm_hook) install=mdadm.install replaces=('raidtools') -options=('force') +md5sums=('4fd8e375a2ee314becd3196c1a250d98' + '6df172c8f77b280018cf87eb3d313f29' + '00cbed931db4f15b6ce49e3e7d433966' + '0c201efd85790fea6aaf7686a9b31510' + '8e44a59031f896d64985a63741ad2cad') build() { cd $srcdir/$pkgname-$pkgver @@ -34,8 +38,3 @@ make MDASSEMBLE_AUTO=1 mdassemble install -D -m755 mdassemble $pkgdir/sbin/mdassemble } -md5sums=('4fd8e375a2ee314becd3196c1a250d98' - '6df172c8f77b280018cf87eb3d313f29' - '00cbed931db4f15b6ce49e3e7d433966' - '0c201efd85790fea6aaf7686a9b31510' - '1a3eb63832cecd6550f5b0a21d58cfdb') Modified: mdadm_hook === --- mdadm_hook 2010-02-07 08:31:20 UTC (rev 67445) +++ mdadm_hook 2010-02-07 08:36:41 UTC (rev 67446) @@ -40,5 +40,9 @@ done fi # assemble everything -[ -e $mdconfig ] /sbin/mdassemble +if [ -e $mdconfig ]; then +/sbin/mdassemble +#fix for udev creating md devices +sleep 0.5 +fi } \ No newline at end of file
[arch-commits] Commit in mdadm/trunk (PKGBUILD mdadm_hook)
Date: Sunday, February 7, 2010 @ 03:48:42 Author: tpowa Revision: 67448 removed sleep again not the error source Modified: mdadm/trunk/PKGBUILD mdadm/trunk/mdadm_hook + PKGBUILD |3 ++- mdadm_hook |6 +- 2 files changed, 3 insertions(+), 6 deletions(-) Modified: PKGBUILD === --- PKGBUILD2010-02-07 08:47:21 UTC (rev 67447) +++ PKGBUILD2010-02-07 08:48:42 UTC (rev 67448) @@ -22,7 +22,7 @@ '6df172c8f77b280018cf87eb3d313f29' '00cbed931db4f15b6ce49e3e7d433966' '0c201efd85790fea6aaf7686a9b31510' - '8e44a59031f896d64985a63741ad2cad') + '1a3eb63832cecd6550f5b0a21d58cfdb') build() { cd $srcdir/$pkgname-$pkgver @@ -38,3 +38,4 @@ make MDASSEMBLE_AUTO=1 mdassemble install -D -m755 mdassemble $pkgdir/sbin/mdassemble } + Modified: mdadm_hook === --- mdadm_hook 2010-02-07 08:47:21 UTC (rev 67447) +++ mdadm_hook 2010-02-07 08:48:42 UTC (rev 67448) @@ -40,9 +40,5 @@ done fi # assemble everything -if [ -e $mdconfig ]; then -/sbin/mdassemble -#fix for udev creating md devices -sleep 0.5 -fi +[ -e $mdconfig ] /sbin/mdassemble } \ No newline at end of file
[arch-commits] Commit in mdadm/trunk (PKGBUILD mdadm_hook)
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 === --- PKGBUILD2010-02-06 17:03:49 UTC (rev 67399) +++ PKGBUILD2010-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
[arch-commits] Commit in mdadm/trunk (PKGBUILD mdadm_hook mdadm_install)
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 === --- PKGBUILD2010-02-05 12:04:08 UTC (rev 67226) +++ PKGBUILD2010-02-05 19:04:52 UTC (rev 67227) @@ -2,7 +2,7 @@ # Maintainer: Judd Vinet jvi...@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 ()