summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-09-30 03:13:48 +0200
committerAaron Griffin <aaron@archlinux.org>2006-09-30 03:13:48 +0200
commitdfa0670d840d5019c4b12e87c4fb0a35e04f49fa (patch)
treecc121a0846934802914c644ceb58e22ff27fbabd
parent8ac392f4272b59cd612231a4d66d28e6c00d5686 (diff)
downloadmkinitcpio-dfa0670d840d5019c4b12e87c4fb0a35e04f49fa.tar.gz
mkinitcpio-dfa0670d840d5019c4b12e87c4fb0a35e04f49fa.tar.xz
Changed block device scanning to really work this time
It seems I was a bit of an idiot before... using sysfs and all that Fixed it to use "find /dev -type b" git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@170 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--install/autodetect33
1 files changed, 15 insertions, 18 deletions
diff --git a/install/autodetect b/install/autodetect
index b4f7b59..87f343c 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -10,27 +10,24 @@ install ()
#Filesystem detection, use sysfs instead of /proc
- findfs () {
- BDEV=/dev/mkinitcpio_dev
- for blkdev in $(find /sys/block -name dev | grep -v -e loop -e ram -e fd); do
- unset FSTYPE
- rm -f $BDEV
- mknod $BDEV b $(/usr/lib/klibc/bin/replace "$(cat ${blkdev})" ':')
- eval $(/usr/lib/klibc/bin/fstype 2>/dev/null < $BDEV)
- if [ -n "$FSTYPE" -a "$FSTYPE" != "swap" -a "$FSTYPE" != "unknown" -a "$FSTYPE" != "luks" -a "$FSTYPE" != "lvm2" ]; then
- echo $FSTYPE
- fi
- done
- rm -f $BDEV
+ findfs ()
+ {
+ for blkdev in $(find /dev -type b | grep -v -e loop -e ram -e fd); do
+ eval $(/usr/lib/klibc/bin/fstype 2>/dev/null < $blkdev)
+ if [ -n "$FSTYPE" -a "$FSTYPE" != "swap" -a "$FSTYPE" != "unknown" -a "$FSTYPE" != "luks" -a "$FSTYPE" != "lvm2" ]; then
+ echo $FSTYPE
+ fi
+ done
}
for fs in $(findfs | sort | uniq); do
- for mod in $(find "${MODULEDIR}" -type f -name "${fs}.ko"); do
- if [ "x${mod}" != "x" ]; then
- AUTODETECT="${AUTODETECT} ${mod}"
- fi
- done
- done
+ for mod in $(find "${MODULEDIR}" -type f -name "${fs}.ko"); do
+ if [ "x${mod}" != "x" ]; then
+ AUTODETECT="${AUTODETECT} ${mod}"
+ fi
+ done
+ done
+
if [ -e /sbin/mdadm ]; then
if [ $UID -eq 0 -o "$(groups | grep disk)" != "" ]; then