diff --git a/html/cgi-bin/hardwaregraphs.cgi b/html/cgi-bin/hardwaregraphs.cgi
index b0e925439..e32f07c25 100644
--- a/html/cgi-bin/hardwaregraphs.cgi
+++ b/html/cgi-bin/hardwaregraphs.cgi
@@ -2,7 +2,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2005-2010 IPFire Team #
+# Copyright (C) 2005-2011 IPFire Team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -93,7 +93,7 @@ if ( $querry[0] =~ "hwtemp"){
&General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
}
- my @disks = `kudzu -qps -c HD 2>/dev/null | grep device: | cut -d" " -f2 | sort | uniq`;
+ my @disks = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
foreach (@disks){
my $disk = $_;
diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi
index 9456c3c22..9fbb04132 100644
--- a/html/cgi-bin/media.cgi
+++ b/html/cgi-bin/media.cgi
@@ -2,7 +2,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2011 IPFire Team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -45,7 +45,7 @@ my @querry = split(/\?/,$ENV{'QUERY_STRING'});
$querry[0] = '' unless defined $querry[0];
$querry[1] = 'hour' unless defined $querry[1];
-my @devices = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
+my @devices = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
if ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??"){
print "Content-type: image/png\n\n";
diff --git a/lfs/glibc b/lfs/glibc
index f8d4260c5..11952a605 100644
--- a/lfs/glibc
+++ b/lfs/glibc
@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2011 IPFire Team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -55,14 +55,12 @@ else
EXTRA_INSTALL =
endif
+EXTRA_CONFIG += --build=$(BUILDTARGET)
+
ifeq "$(MACHINE_TYPE)" "arm"
# Disable hardware FP for ARM.
EXTRA_CONFIG += \
- --build=arm \
- --host=$(BUILDTARGET) \
--without-fp
-else
- EXTRA_CONFIG += --build=$(BUILDTARGET)
endif
###############################################################################
diff --git a/lfs/linux b/lfs/linux
index a81aabcd1..15347d472 100644
--- a/lfs/linux
+++ b/lfs/linux
@@ -165,7 +165,7 @@ endif
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.27_ipg-fix-driver-name.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.27_mcs7830-fix-driver-name.patch
-ifeq "$(MACHINE)" "arm"
+ifeq "$(MACHINE_TYPE)" "arm"
# Add dreamplug support on ARM
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.45-arm_kirkwood_dreamplug.patch
endif
diff --git a/lfs/python-lzma b/lfs/python-lzma
index 0d2fcc412..c2ffcfc45 100644
--- a/lfs/python-lzma
+++ b/lfs/python-lzma
@@ -80,8 +80,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && python setup.py install
# unzip the egg because it won't work without
cd /usr/lib/python2.7/site-packages && \
- unzip pyliblzma-$(VER)-py2.7-linux-$(shell uname -m).egg
- rm -rf /usr/lib/python2.7/site-packages/pyliblzma-$(VER)-py2.7-linux-$(shell uname -m).egg
+ unzip pyliblzma-$(VER)-py2.7-linux-*.egg
+ rm -rf /usr/lib/python2.7/site-packages/pyliblzma-$(VER)-py2.7-linux-*.egg
rm -rf /usr/lib/python2.7/site-packages/EGG-INFO
@rm -rf $(DIR_APP)
@$(POSTBUILD)
diff --git a/src/initscripts/init.d/smartenabler b/src/initscripts/init.d/smartenabler
index 489560bd2..7344c2f1c 100644
--- a/src/initscripts/init.d/smartenabler
+++ b/src/initscripts/init.d/smartenabler
@@ -7,7 +7,7 @@
case "$1" in
start)
boot_mesg -n "Enabling S.M.A.R.T.: ";
- for disk in `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; do
+ for disk in `find /sys/block/* -maxdepth 0 ! -name sr* ! -name ram* ! -name loop* -exec basename {} \; | sort | uniq`; do
/usr/sbin/smartctl --smart=on /dev/$disk > /dev/nul;
if [ ${?} = 0 ]; then
boot_mesg -n "$SUCCESS$disk$NORMAL ";
diff --git a/src/scripts/hddshutdown b/src/scripts/hddshutdown
index bb28f830a..dc49a1706 100644
--- a/src/scripts/hddshutdown
+++ b/src/scripts/hddshutdown
@@ -22,7 +22,7 @@
# IPFire HDD Shutdown state reader
#
-my @devices = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
+my @devices = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
my $diskstats = "";
my $newdiskstats = "";
my $debug = 1;
diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs
index 97d086a10..48444f5e1 100644
--- a/src/scripts/makegraphs
+++ b/src/scripts/makegraphs
@@ -102,7 +102,7 @@ sub updatehdddata{
## Update vnstat
system ('/usr/bin/vnstat -u');
-my @disks = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
+my @disks = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
system("unlink /var/run/hddstatus 2>/dev/null && touch /var/run/hddstatus");
foreach (@disks){
my $disk = $_;
diff --git a/src/scripts/scanhd b/src/scripts/scanhd
index 0d97d5530..f46a63073 100644
--- a/src/scripts/scanhd
+++ b/src/scripts/scanhd
@@ -1,17 +1,14 @@
#!/bin/bash
-
case "$1" in
ide)
- /sbin/kudzu -qps -c HD | egrep "desc|device:" | awk -F': ' '{print $2}' | sed -e '/"$/a\\' -e "s/$/\;/g" | tr "\n" "XX" | sed -e "s/XX/\n/g" -e "s/\;X/\;/g" | grep '^"' -v > /var/ipfire/extrahd/scan
- if [ -e /dev/.mdadm ]; then
- echo 'md;"MD Software-Raid";' >> /var/ipfire/extrahd/scan
- fi
- if [ -e /dev/mmcblk0 ]; then
- echo 'mmcblk0;"MMC/SD Cardreader";' >> /var/ipfire/extrahd/scan
- fi
- if [ -e /dev/mmcblk1 ]; then
- echo 'mmcblk1;"MMC/SD Cardreader";' >> /var/ipfire/extrahd/scan
- fi
+ rm -f /var/ipfire/extrahd/scan
+ for DEV in `find /sys/block/* -maxdepth 0 ! -name sr* ! -name ram* ! -name loop* -exec basename {} \; | sort | uniq`
+ do
+ VENDOR=`cat /sys/block/$DEV/device/vendor 2>/dev/null`
+ MODEL=`cat /sys/block/$DEV/device/model 2>/dev/null`
+ REV=`cat /sys/block/$DEV/device/rev 2>/dev/null`
+ echo "$DEV;$VENDOR $MODEL $REV" >> /var/ipfire/extrahd/scan
+ done
;;
partitions)
cat /proc/partitions | awk '{print $4 " " $3 }' | grep -v name | grep -v "^[:space:]*$" | \