]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/scripts/scanhd
4 rm -f /var
/ipfire
/extrahd
/scan
5 for DEV
in `find /sys/block/* -maxdepth 0 ! -name sr* ! -name ram* ! -name loop* -exec basename {} \; | sort | uniq`
7 VENDOR
=`cat /sys/block/$DEV/device/vendor 2>/dev/null`
8 MODEL
=`cat /sys/block/$DEV/device/model 2>/dev/null`
9 REV
=`cat /sys/block/$DEV/device/rev 2>/dev/null`
10 echo "$DEV;$VENDOR $MODEL $REV" >> /var
/ipfire
/extrahd
/scan
14 cat /proc
/partitions |
awk '{print $4 " " $3 }' |
grep -v name |
grep -v "^[[:space:]]*$" | \
15 while read device size
; do
16 [ -z "${device}" ] && continue
17 echo "${device};${size};$(blkid -c /dev/null -s UUID -o value /dev/${device});"
18 done > /var
/ipfire
/extrahd
/partitions
21 echo "Usage: $0 (ide|partitions)"