| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #!/bin/sh
- # diagnostics
- . /opt/wz_mini/www/cgi-bin/shared.cgi
- title="Diagnostics $camver on $camfirmware running wz_mini $hackver as $HOSTNAME"
- function handle_css
- {
- echo -ne "<style type=\"text/css\">"
- cat config.css
- echo -ne '</style>';
- }
- dmesg_test()
- {
- x=$(dmesg | grep $1)
- if [-n "$x" ]; then
- echo "<div>$2 error found</div>"
- else
- echo "<div>no $2 error</div>"
- fi
- }
- echo "HTTP/1.1 200"
- echo -e "Content-type: text/html\n\n"
- echo ""
- echo "<html><head><title>$title</title>"
- handle_css
- echo "</head>"
- echo "<body>"
- echo "<h1>$title</h1>"
- echo "<h2>SD Card Test</h2>"
- dmesg_test "invalid access to FAT" "SD card"
- dmesg_test "Filesystem has been set read-only" "SD read only"
- dmesg_test "fat_get_cluster: invalid cluster chain" "file system"
- echo "<h2>Firmware Version Test</h2>"
- echo "Firmware Version: $camfirmware <br />"
- if [ "$camfirmware" = "4.36.10.2163" ]; then
- echo "<div>this version is broken. Please downgrade to a working version</div>"
- fi
- echo "<pre>"
- dmesg
- echo "</pre>"
- version_info "display_BAR"
- echo "</body>"
- echo "</html>"
|