From 5382125f58fa9d53b3312007f1d611770385e2bd Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 10:12:16 +0200 Subject: [PATCH 1/8] smartenabler: replace kudzu. --- src/initscripts/init.d/smartenabler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 "; From 44fb40388d4542e95661d47169b7e0675341d89b Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 10:35:38 +0200 Subject: [PATCH 2/8] scanhd: replace kudzu. --- src/scripts/scanhd | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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:]*$" | \ From c0dbb9fa902afecfe5942b5e85bd0e6e18b85951 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 24 Sep 2011 11:02:15 +0200 Subject: [PATCH 3/8] python-lzma: Fix extraction of the egg. --- lfs/python-lzma | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) From 1e18d32b6e38d050b464ca6a1894e8f32e64dc45 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 11:53:08 +0200 Subject: [PATCH 4/8] cgi's: replace kudzu. --- html/cgi-bin/hardwaregraphs.cgi | 4 ++-- html/cgi-bin/media.cgi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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"; From 5902dd464bac74312141006986fde73cf14abd84 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 12:00:55 +0200 Subject: [PATCH 5/8] hddshutdown: replace kudzu. --- src/scripts/hddshutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 491058667250a1e720b39c44e97c376d25c8eea2 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 12:01:12 +0200 Subject: [PATCH 6/8] makegraphs: replace kudzu. --- src/scripts/makegraphs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = $_; From d10cf0df6074c7b1588ecfb74ec3b0fca3628412 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 13:51:31 +0000 Subject: [PATCH 7/8] glibc: fix toolchain build on arm. --- lfs/glibc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 ############################################################################### From c6d9d18bafb22edd7190413354b31fdccf97277a Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 13:53:24 +0000 Subject: [PATCH 8/8] kernel: fix dreamplug patching. --- lfs/linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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