Changeset 105
- Timestamp:
- 05/03/07 22:09:32 (2 years ago)
- Files:
-
- branches/stable/0.8/bin/thinclient (modified) (2 diffs)
- branches/stable/0.8/usr/lib/webif/advanced.sh (modified) (2 diffs)
- branches/stable/0.8/usr/lib/webif/lang/de/fon.txt (modified) (1 diff)
- branches/stable/0.8/www/cgi-bin/webif/fonupdate.sh (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/stable/0.8/bin/thinclient
r69 r105 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 branches/stable/0.8/usr/lib/webif/advanced.sh
r101 r105 90 90 </tr> 91 91 <tr> 92 <td align=\"right\"><span class=\"submenu${sel_fonupdate:+_sel}\"> 93 <a href=\"/cgi-bin/webif/fonupdate.sh\">@TR<<Fon Updates>></a> 94 </span></td> 95 </tr> 96 <tr> 92 97 <td align=\"right\"><span class=\"submenu${sel_reboot:+_sel}\"> 93 98 <a href=\"/cgi-bin/webif/reboot.sh\">@TR<<Reboot>></a> … … 135 140 </tr> 136 141 <tr> 142 <td align=\"right\"><span class=\"submenu${sel_fonupdate:+_sel}\"> 143 <a href=\"/cgi-bin/webif/fonupdate.sh\">@TR<<Fon Updates>></a> 144 </span></td> 145 </tr> 146 <tr> 137 147 <td align=\"right\"><span class=\"submenu${sel_reboot:+_sel}\"> 138 148 <a href=\"/cgi-bin/webif/reboot.sh\">@TR<<Reboot>></a> branches/stable/0.8/usr/lib/webif/lang/de/fon.txt
r52 r105 587 587 LangSet => Hier kannst Du Deine Spracheinstellungen wÀhlen 588 588 589 ########################## 590 # ../webif/fonupdate.sh # 591 ########################## 592 593 #Fon Updates 594 Fon Updates => Fon Updates 595 596 #regular FON Updates 597 FON Update Title => regulÀre FON Updates 598 599 #Here you can see relevant updates ejected by FON. 600 FON Updates => Hier kannst Du die nicht standardisierten Updates von FON sehen. 601 602 #show 603 Show => Anzeigen 604 605 #execute 606 Execute => AusfÌhren 607 608 #Content of the file: 609 FON Content => Inhalt der Datei: 610 611 #The script has been executed successfully. 612 FON Execute success => Das Script wurde erfolgreich ausgefÌhrt. 613 614 #The script has been deleted successfully. 615 FON Delete success => Das Script wurde erfolgreich gelöscht. 616 617 #Check for Updates... 618 FON Check => PrÌfe auf Updates... 619 589 620 ################### 590 621 # ../webif/mac.sh #
