Merge branch 'arm-port' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-2.x into arm-port

This commit is contained in:
Michael Tremer
2011-09-24 17:46:11 +02:00
9 changed files with 21 additions and 26 deletions

View File

@@ -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 = $_;

View File

@@ -2,7 +2,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# #
# 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";

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# #
# 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
###############################################################################

View File

@@ -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

View File

@@ -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)

View File

@@ -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 ";

View File

@@ -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;

View File

@@ -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 = $_;

View File

@@ -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:]*$" | \