tazpanel rev 619

hardware.cgi: add SSD detection (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 03 09:40:56 2017 +0100 (16 months ago)
parents 424eec4e4b44
children c648d941e7fa
files hardware.cgi
line diff
     1.1 --- a/hardware.cgi	Thu Nov 02 21:57:05 2017 +0100
     1.2 +++ b/hardware.cgi	Fri Nov 03 09:40:56 2017 +0100
     1.3 @@ -22,9 +22,9 @@
     1.4  disk_info() {
     1.5  	fdisk -l | fgrep Disk | while read a b c; do
     1.6  		d=${b#/dev/}
     1.7 -		d="/sys/block/${d%:}/device"
     1.8  		t="HD"
     1.9  		[ "$(cat /sys/block/${d%:}/queue/rotational)" -eq "0" ] && t="SSD"
    1.10 +		d="/sys/block/${d%:}/device"
    1.11  		[ -d $d ] && echo "$a $b $c, $t $(cat $d/vendor) $(cat $d/model)"
    1.12  		smartctl -a ${b%:} | sed '/^Model/,/^Firmware/!d'
    1.13  	done 2> /dev/null | sed 's/  */ /g'