[arch-commits] Commit in hwdetect/trunk (PKGBUILD hwdetect)
Tobias Powalowski
tpowa at archlinux.org
Mon Feb 8 22:11:26 UTC 2010
Date: Monday, February 8, 2010 @ 17:11:26
Author: tpowa
Revision: 67612
upgpkg: hwdetect 2010.02-2
fix syntax of new blkid and sys layout
Modified:
hwdetect/trunk/PKGBUILD
hwdetect/trunk/hwdetect
----------+
PKGBUILD | 4 ++--
hwdetect | 28 ++++++++++++++--------------
2 files changed, 16 insertions(+), 16 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-02-08 20:13:45 UTC (rev 67611)
+++ PKGBUILD 2010-02-08 22:11:26 UTC (rev 67612)
@@ -2,7 +2,7 @@
# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
pkgname=hwdetect
pkgver=2010.02
-pkgrel=1
+pkgrel=2
pkgdesc="Hardware detection script with loading modules and mkinitcpio.conf / rc.conf support"
arch=(i686 x86_64)
license=('GPL')
@@ -16,4 +16,4 @@
build() {
install -D -m 755 $startdir/src/hwdetect $startdir/pkg/sbin/hwdetect
}
-md5sums=('1c4dd29f64645dd7e464b71f1778ba8f')
+md5sums=('37c57d0158761b5ece8fdc341cdcce43')
Modified: hwdetect
===================================================================
--- hwdetect 2010-02-08 20:13:45 UTC (rev 67611)
+++ hwdetect 2010-02-08 22:11:26 UTC (rev 67612)
@@ -129,7 +129,7 @@
ADVANCED="mdadm encrypt"
realdevice="$(cryptsetup status $ROOTDEVICE 2>/dev/null | grep "device:.*/dev/md" | sed -e 's#.*\ ##g')"
# check on lvm
- [ "$(mdadm --detail $realdevice | grep "/dev/block/254")" ] && ADVANCED="lvm2 mdadm encrypt"
+ [ "$(mdadm --detail $realdevice | grep "/dev/dm-")" ] && ADVANCED="lvm2 mdadm encrypt"
fi
fi
# check if lvm is used
@@ -137,25 +137,25 @@
ADVANCED="lvm2"
vg="$(echo $(lvs -o vg_name --noheading $ROOTDEVICE))"
# check on encrypt
- if [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/block/254")" ]; then
+ if [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/dm-")" ]; then
ADVANCED="encrypt lvm2"
# check on raid
[ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/md")" ] && ADVANCED="mdadm encrypt lvm2"
- for i in "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/block/254")"; do
+ for i in "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/dm-")"; do
realdevice="$(echo $i | cut -d ' ' -f1)"
- getsymlink="$(readlink $realdevice)"
- correctdevice="$(echo $getsymlink | sed -e 's#\.\.#/dev#g')"
- [ "$(cryptsetup status $correctdevice 2>/dev/null | grep "device:.*/dev/md")" ] && ADVANCED="mdadm encrypt lvm2"
+ #getsymlink="$(readlink $realdevice)"
+ #correctdevice="$(echo $getsymlink | sed -e 's#\.\.#/dev#g')"
+ [ "$(cryptsetup status $realdevice 2>/dev/null | grep "device:.*/dev/md")" ] && ADVANCED="mdadm encrypt lvm2"
done
fi
# check on raid
if [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/md")" ]; then
ADVANCED="mdadm lvm2"
#check on encrypt
- [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/block/254")" ] && ADVANCED="encrypt mdadm lvm2"
+ [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/dm-")" ] && ADVANCED="encrypt mdadm lvm2"
for i in "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/md")"; do
realdevice="$(echo $i | cut -d ' ' -f1)"
- [ "$(mdadm --detail $realdevice | grep "/dev/block/254")" ] && ADVANCED="encrypt mdadm lvm2"
+ [ "$(mdadm --detail $realdevice | grep "/dev/dm-")" ] && ADVANCED="encrypt mdadm lvm2"
done
fi
fi
@@ -166,10 +166,10 @@
# raid partitions or raid?
if [ "$(echo "$ROOTDEVICE" | grep "/dev/md_d")" ]; then
realdevice="$(echo $ROOTDEVICE | sed -e 's#p.*##g' -e 's#/dev/##g')"
- if ! [ "$(find /sys/block/$realdevice/ -name 'dm*' 2>/dev/null)" = "" ]; then
+ if ! [ "$(find /sys/block/$realdevice/slaves/ -name 'dm*' 2>/dev/null)" = "" ]; then
SET_LVM=""
SET_ENCRYPT=""
- for k in $(find /sys/block/$realdevice/ -name 'dm*' 2>/dev/null); do
+ for k in $(find /sys/block/$realdevice/slaves/ -name 'dm*' 2>/dev/null); do
[ "$(lvs /dev/mapper/$(cat $k/dm/name) 2>/dev/null)" ] && SET_LVM="1"
[ "$(cryptsetup status $(cat $k/dm/name) 2>/dev/null)" ] && SET_ENCRYPT="1"
# check on lvm
@@ -180,16 +180,16 @@
realdevice="$(cryptsetup status $(cat $k/dm/name) 2>/dev/null | grep "device:.*/dev/mapper/" | sed -e 's#.*\ ##g')"
[ "$(lvs $realdevice 2>/dev/null)" ] && ADVANCED="lvm2 encrypt mdadm"
vg="$(echo $(lvs -o vg_name --noheading /dev/mapper/$(cat $k/dm/name) 2>/dev/null))"
- [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/block/254")" ] && ADVANCED="encrypt lvm2 mdadm"
+ [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/dm-")" ] && ADVANCED="encrypt lvm2 mdadm"
done
[ "$SET_LVM" = "1" -a "$SET_ENCRYPT" = "1" ] && ADVANCED="lvm2 encrypt mdadm"
fi
else
realdevice="$(echo $ROOTDEVICE | sed -e 's#/dev/##g')"
- if ! [ "$(find /sys/block/$realdevice/ -name 'dm*' 2>/dev/null)" = "" ]; then
+ if ! [ "$(find /sys/block/$realdevice/slaves/ -name 'dm*' 2>/dev/null)" = "" ]; then
SET_LVM=""
SET_ENCRYPT=""
- for k in $(find /sys/block/$realdevice/ -name 'dm*' 2>/dev/null); do
+ for k in $(find /sys/block/$realdevice/slaves/ -name 'dm*' 2>/dev/null); do
[ "$(lvs /dev/mapper/$(cat $k/dm/name) 2>/dev/null)" ] && SET_LVM="1"
[ "$(cryptsetup status $(cat $k/dm/name) 2>/dev/null)" ] && SET_ENCRYPT="1"
# check on lvm
@@ -200,7 +200,7 @@
realdevice="$(cryptsetup status $(cat $k/dm/name) 2>/dev/null | grep "device:.*/dev/mapper/" | sed -e 's#.*\ ##g')"
[ "$(lvs $realdevice 2>/dev/null)" ] && ADVANCED="lvm2 encrypt mdadm"
vg="$(echo $(lvs -o vg_name --noheading /dev/mapper/$(cat $k/dm/name) 2>/dev/null))"
- [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/block/254")" ] && ADVANCED="encrypt lvm2 mdadm"
+ [ "$(pvs -o pv_name,vg_name --noheading | grep "$vg$" | grep "/dev/dm-")" ] && ADVANCED="encrypt lvm2 mdadm"
done
[ "$SET_LVM" = "1" -a "$SET_ENCRYPT" = "1" ] && ADVANCED="lvm2 encrypt mdadm"
fi
More information about the arch-commits
mailing list