mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
Merge branch 'arm-port' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-2.x into arm-port
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# 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 #
|
# 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 #
|
# 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);
|
&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){
|
foreach (@disks){
|
||||||
my $disk = $_;
|
my $disk = $_;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# 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 #
|
# 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 #
|
# 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[0] = '' unless defined $querry[0];
|
||||||
$querry[1] = 'hour' unless defined $querry[1];
|
$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??"){
|
if ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??"){
|
||||||
print "Content-type: image/png\n\n";
|
print "Content-type: image/png\n\n";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# 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 #
|
# 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 #
|
# it under the terms of the GNU General Public License as published by #
|
||||||
@@ -55,14 +55,12 @@ else
|
|||||||
EXTRA_INSTALL =
|
EXTRA_INSTALL =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
EXTRA_CONFIG += --build=$(BUILDTARGET)
|
||||||
|
|
||||||
ifeq "$(MACHINE_TYPE)" "arm"
|
ifeq "$(MACHINE_TYPE)" "arm"
|
||||||
# Disable hardware FP for ARM.
|
# Disable hardware FP for ARM.
|
||||||
EXTRA_CONFIG += \
|
EXTRA_CONFIG += \
|
||||||
--build=arm \
|
|
||||||
--host=$(BUILDTARGET) \
|
|
||||||
--without-fp
|
--without-fp
|
||||||
else
|
|
||||||
EXTRA_CONFIG += --build=$(BUILDTARGET)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
@@ -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_ipg-fix-driver-name.patch
|
||||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.27_mcs7830-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
|
# Add dreamplug support on ARM
|
||||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.45-arm_kirkwood_dreamplug.patch
|
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.45-arm_kirkwood_dreamplug.patch
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
|||||||
cd $(DIR_APP) && python setup.py install
|
cd $(DIR_APP) && python setup.py install
|
||||||
# unzip the egg because it won't work without
|
# unzip the egg because it won't work without
|
||||||
cd /usr/lib/python2.7/site-packages && \
|
cd /usr/lib/python2.7/site-packages && \
|
||||||
unzip 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-$(shell uname -m).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 /usr/lib/python2.7/site-packages/EGG-INFO
|
||||||
@rm -rf $(DIR_APP)
|
@rm -rf $(DIR_APP)
|
||||||
@$(POSTBUILD)
|
@$(POSTBUILD)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
boot_mesg -n "Enabling S.M.A.R.T.: ";
|
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;
|
/usr/sbin/smartctl --smart=on /dev/$disk > /dev/nul;
|
||||||
if [ ${?} = 0 ]; then
|
if [ ${?} = 0 ]; then
|
||||||
boot_mesg -n "$SUCCESS$disk$NORMAL ";
|
boot_mesg -n "$SUCCESS$disk$NORMAL ";
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
# IPFire HDD Shutdown state reader
|
# 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 $diskstats = "";
|
||||||
my $newdiskstats = "";
|
my $newdiskstats = "";
|
||||||
my $debug = 1;
|
my $debug = 1;
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ sub updatehdddata{
|
|||||||
## Update vnstat
|
## Update vnstat
|
||||||
system ('/usr/bin/vnstat -u');
|
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");
|
system("unlink /var/run/hddstatus 2>/dev/null && touch /var/run/hddstatus");
|
||||||
foreach (@disks){
|
foreach (@disks){
|
||||||
my $disk = $_;
|
my $disk = $_;
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
ide)
|
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
|
rm -f /var/ipfire/extrahd/scan
|
||||||
if [ -e /dev/.mdadm ]; then
|
for DEV in `find /sys/block/* -maxdepth 0 ! -name sr* ! -name ram* ! -name loop* -exec basename {} \; | sort | uniq`
|
||||||
echo 'md;"MD Software-Raid";' >> /var/ipfire/extrahd/scan
|
do
|
||||||
fi
|
VENDOR=`cat /sys/block/$DEV/device/vendor 2>/dev/null`
|
||||||
if [ -e /dev/mmcblk0 ]; then
|
MODEL=`cat /sys/block/$DEV/device/model 2>/dev/null`
|
||||||
echo 'mmcblk0;"MMC/SD Cardreader";' >> /var/ipfire/extrahd/scan
|
REV=`cat /sys/block/$DEV/device/rev 2>/dev/null`
|
||||||
fi
|
echo "$DEV;$VENDOR $MODEL $REV" >> /var/ipfire/extrahd/scan
|
||||||
if [ -e /dev/mmcblk1 ]; then
|
done
|
||||||
echo 'mmcblk1;"MMC/SD Cardreader";' >> /var/ipfire/extrahd/scan
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
partitions)
|
partitions)
|
||||||
cat /proc/partitions | awk '{print $4 " " $3 }' | grep -v name | grep -v "^[:space:]*$" | \
|
cat /proc/partitions | awk '{print $4 " " $3 }' | grep -v name | grep -v "^[:space:]*$" | \
|
||||||
|
|||||||
Reference in New Issue
Block a user