From 0973d227c601ae8b2d96314ab05c83fa94dffb38 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Wed, 3 Feb 2010 02:53:15 +0000 Subject: [PATCH] login modified to detect x86 or IP0X platform git-svn-id: https://svn.code.sf.net/p/freetel/code@135 01035d8c-6547-0410-b346-abe4f91aad63 --- mini-asterisk-gui/cgi-bin/login.sh | 15 ++++++++++++++- mini-asterisk-gui/cgi-bin/tooltip.css | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/mini-asterisk-gui/cgi-bin/login.sh b/mini-asterisk-gui/cgi-bin/login.sh index 0ae903a8..39862119 100644 --- a/mini-asterisk-gui/cgi-bin/login.sh +++ b/mini-asterisk-gui/cgi-bin/login.sh @@ -30,8 +30,21 @@ EOF EOF else - testuser root $pass + + # If we are a non-blackfin then use hard coded password for now. + # I don't feel comfortable sending root password through a web + # GUI for x86 boxes, but this is reasonable approach for embedded + # systems. TODO: add a way to store and modify x86 passwds + + cat /proc/cpuinfo | grep "CPU:.*ADSP" > /dev/null if [ $? -eq 0 ]; then + # Blackfin IP0X system + testuser root "$pass"; res=$? + else + [ $pass = "uClinux" ] ; res=$? + fi + + if [ $res -eq 0 ]; then # login sucessful echo "Content-type: text/html" diff --git a/mini-asterisk-gui/cgi-bin/tooltip.css b/mini-asterisk-gui/cgi-bin/tooltip.css index f426356c..beaefc07 100644 --- a/mini-asterisk-gui/cgi-bin/tooltip.css +++ b/mini-asterisk-gui/cgi-bin/tooltip.css @@ -1,4 +1,4 @@ -.tip {font:12px/14px +.tip {font:14px/16px Arial,Helvetica,sans-serif; border:solid 1px #666666; width:270px; padding:1px; position:absolute; z-index:100; -- 2.25.1