This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via 44fb40388d4542e95661d47169b7e0675341d89b (commit)
via 5382125f58fa9d53b3312007f1d611770385e2bd (commit)
from 25fadf991c85ced2b12b5b7a7dea83915d0436ca (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 44fb40388d4542e95661d47169b7e0675341d89b
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Sat Sep 24 10:35:38 2011 +0200
scanhd: replace kudzu.
commit 5382125f58fa9d53b3312007f1d611770385e2bd
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Sat Sep 24 10:12:16 2011 +0200
smartenabler: replace kudzu.
-----------------------------------------------------------------------
Summary of changes:
src/initscripts/init.d/smartenabler | 2 +-
src/scripts/scanhd | 19 ++++++++-----------
2 files changed, 9 insertions(+), 12 deletions(-)
Difference in files:
diff --git a/src/initscripts/init.d/smartenabler b/src/initscripts/init.d/smartenabler
index 489560b..7344c2f 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/scanhd b/src/scripts/scanhd
index 0d97d55..f46a630 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:]*$" | \
hooks/post-receive
--
IPFire 2.x development tree