Topic: BUG (Minor): /www/cgi-bin/ : Scripts don't properly execute
EDIT:
This was caught and fixed before (and better!): http://forum.chumby.com/viewtopic.php?id=966
I noticed that when I ran the "wifi" script from the built-in webserver it displayed a lot of <pre> tags for no good reason, I dug a little deeper and discovered that for some reason (??) my browser wasn't receiving the full output.
System Specifics: Mac OS X, Safari 3
View bug by going to http://your.chumby.ip/cgi-bin/wifi
I was able to "correct" the bug by duplicating the file in /www/cgi-bin/wifi to /www/cgi-bin/custom/wifi
I then used "vi" to insert the following on line 2:
echo ""
Thus changing the script (in it's whole) to:
#!/bin/sh
echo ""
echo "<html><head>"
echo "<title>Chumby Wireless Status</title>"
echo "<meta http-equiv=\"Refresh\" content=\"5\";>"
echo "</head>"
echo "<body>"
echo "<h4>Wireless Stats</h4>"
echo "<pre>"
iwconfig rausb0 |grep -v "Encryption key:"
echo "</pre>"
echo "<pre>"
cat /proc/net/wireless
echo "</pre>"
echo "</body></html>"
going to http://your.chumby.ip/cgi-bin/custom/wifi shows the "correct" output.
Same solution for "memstats"