ExtraHD! Die Erweiterung um Festplatten schnell einzubinden!

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@420 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-02-15 18:17:05 +00:00
parent d02350a277
commit aa2870e623
9 changed files with 358 additions and 4 deletions

13
src/scripts/scanhd Normal file
View File

@@ -0,0 +1,13 @@
#!/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" > /var/ipfire/extrahd/scan
;;
partitions)
cat /proc/partitions | awk '{print $4 ";" $3 ";"}' | grep -v name | grep -v "^;;$" > /var/ipfire/extrahd/partitions
;;
*)
echo "Usage: $0 (ide|partitions)"
;;
esac