]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/scripts/scanhd
5 /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
6 if [ -e /dev
/.mdadm
]; then
7 echo 'md;"MD Software-Raid";' >> /var
/ipfire
/extrahd
/scan
9 if [ -e /dev
/mmcblk0
]; then
10 echo 'mmcblk0;"MMC/SD Cardreader";' >> /var
/ipfire
/extrahd
/scan
12 if [ -e /dev
/mmcblk1
]; then
13 echo 'mmcblk1;"MMC/SD Cardreader";' >> /var
/ipfire
/extrahd
/scan
17 cat /proc
/partitions |
awk '{print $4 " " $3 }' |
grep -v name |
grep -v "^[:space:]*$" | \
18 while read device size
; do
19 [ -z "${device}" ] && continue
20 echo "${device};${size};$(blkid -c /dev/null -s UUID -o value /dev/${device});"
21 done > /var
/ipfire
/extrahd
/partitions
24 echo "Usage: $0 (ide|partitions)"