Changeset 104
- Timestamp:
- 04/27/07 22:43:22 (2 years ago)
- Files:
-
- trunk/bin/thinclient (modified) (2 diffs)
- trunk/usr/lib/webif/advanced.sh (modified) (2 diffs)
- trunk/usr/lib/webif/lang/de/fon.txt (modified) (1 diff)
- trunk/www/cgi-bin/webif/fonupdate.sh (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bin/thinclient
r68 r104 39 39 WLMAC=$( ifconfig $wifi_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 40 40 WLMAC2=$( ifconfig $lan_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 41 ETMAC=$( ifconfig eth0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 41 if [ -f /tmp/eth0_mac ] 42 then 43 ETMAC=$(cat /tmp/eth0_mac) 44 else 45 ETMAC=$( ifconfig eth0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 46 fi 42 47 43 48 # gather information about this machine … … 48 53 CHILLVER="1.0-1" 49 54 50 MODE=$1 55 record_changes () { 56 if [ ! -d /www/updates ]; then 57 mkdir /www/updates 58 fi 59 if [ -s /tmp/thinclient.sh ]; then 60 FS=$(ls -l /tmp/$1.sh | tr -s " " | cut -d " " -f 5) 61 if [ $FS -gt 35 ]; then 62 cp /tmp/$1.sh /www/updates/$1-$(date '+%Y%m%d-%H%M').sh 63 fi 64 else 65 echo "Datei leer oder nicht da. $(date '+%Y%m%d-%H%M')" >> /www/updates/fonupdate.log; 66 fi 67 } 51 68 52 rm -f /tmp/.thinclient.sh 69 exec_cron_mode () { 70 if [ "t"$2 != "t" ]; then 71 sleep "$((0x$(head -c2 /dev/urandom | hexdump | awk '$2 > 0 {print $2}') % $2))" 72 fi 73 74 echo "mode='$1' wlmac='$WLMAC' mac='$ETMAC' fonrev='$FONREV' firmware='$FIRMWARE' chillver='$CHILLVER' thclver='$THCLVER' device='$DEVICE'" | ssh -T ${PORT:+ -p $PORT}${KEY:+ -i $KEY} "${USER}@${SERVER}" > /tmp/thinclient.sh 75 76 record_changes 'thinclient' 77 } 78 79 rm -f /tmp/thinclient.sh 53 80 54 81 case "$1" in 55 cron) 56 sleep "$((0x$(head -c2 /dev/urandom | hexdump | awk '$2 > 0 {print $2}') % 3600))" 57 echo "mode='$MODE' wlmac='$WLMAC' mac='$ETMAC' fonrev='$FONREV' firmware='$FIRMWARE' chillver='$CHILLVER' thclver='$THCLVER' device='$DEVICE'" | ssh -T ${PORT:+ -p $PORT}${KEY:+ -i $KEY} "${USER}@${SERVER}" > /tmp/.thinclient.sh 82 cron) 83 exec_cron_mode $1 '3600' 58 84 ;; 59 start)60 e cho "mode='$MODE' wlmac='$WLMAC' mac='$ETMAC' fonrev='$FONREV' firmware='$FIRMWARE' chillver='$CHILLVER' thclver='$THCLVER' device='$DEVICE'" | ssh -T ${PORT:+ -p $PORT}${KEY:+ -i $KEY} "${USER}@${SERVER}" > /tmp/.thinclient.sh85 force) 86 exec_cron_mode 'cron' 61 87 ;; 62 *) 63 echo "Usage: `basename $0` {cron|start}" 88 start) 89 exec_cron_mode $1 90 ;; 91 *) 92 echo "Usage: `basename $0` {cron|force|start}" 64 93 exit 65 94 esac trunk/usr/lib/webif/advanced.sh
r100 r104 95 95 </tr> 96 96 <tr> 97 <td align=\"right\"><span class=\"submenu${sel_ diag:+_sel}\">98 <a href=\"/cgi-bin/webif/ diag.sh\">@TR<<Diag>></a>97 <td align=\"right\"><span class=\"submenu${sel_fonupdate:+_sel}\"> 98 <a href=\"/cgi-bin/webif/fonupdate.sh\">@TR<<Fon Updates>></a> 99 99 </span></td> 100 100 </tr> … … 150 150 </tr> 151 151 <tr> 152 <td align=\"right\"><span class=\"submenu${sel_ diag:+_sel}\">153 <a href=\"/cgi-bin/webif/ diag.sh\">@TR<<Diag>></a>152 <td align=\"right\"><span class=\"submenu${sel_fonupdate:+_sel}\"> 153 <a href=\"/cgi-bin/webif/fonupdate.sh\">@TR<<Fon Updates>></a> 154 154 </span></td> 155 155 </tr> trunk/usr/lib/webif/lang/de/fon.txt
r64 r104 593 593 FonFan Status Picker => FonFan Status Picker 594 594 595 ########################## 596 # ../webif/fonupdate.sh # 597 ########################## 598 599 #Fon Updates 600 Fon Updates => Fon Updates 601 602 #regular FON Updates 603 FON Update Title => regulÀre FON Updates 604 605 #Here you can see relevant updates ejected by FON. 606 FON Updates => Hier kannst Du die nicht standardisierten Updates von FON sehen. 607 608 #show 609 Show => Anzeigen 610 611 #execute 612 Execute => AusfÌhren 613 614 #Content of the file: 615 FON Content => Inhalt der Datei: 616 617 #The script has been executed successfully. 618 FON Execute success => Das Script wurde erfolgreich ausgefÌhrt. 619 620 #The script has been deleted successfully. 621 FON Delete success => Das Script wurde erfolgreich gelöscht. 622 623 #Check for Updates... 624 FON Check => PrÌfe auf Updates... 625 595 626 ########################### 596 627 # ../webif/help/fonfan.sh #
