Changeset 105

Show
Ignore:
Timestamp:
05/03/07 22:09:32 (2 years ago)
Author:
Trellmor
Message:

Backport: FON Updates

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable/0.8/bin/thinclient

    r69 r105  
    3939WLMAC=$( ifconfig $wifi_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 
    4040WLMAC2=$( 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" ) 
     41if [ -f /tmp/eth0_mac ] 
     42then 
     43        ETMAC=$(cat /tmp/eth0_mac) 
     44else 
     45        ETMAC=$( ifconfig eth0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 
     46fi 
    4247 
    4348# gather information about this machine 
     
    4853CHILLVER="1.0-1" 
    4954 
    50 MODE=$1 
     55record_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
    5168 
    52 rm -f /tmp/.thinclient.sh 
     69exec_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 
     79rm -f /tmp/thinclient.sh 
    5380 
    5481case "$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' 
    5884                ;; 
    59     start
    60                 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 
     85       force
     86                exec_cron_mode 'cron' 
    6187                ;; 
    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}" 
    6493                exit 
    6594esac 
  • branches/stable/0.8/usr/lib/webif/advanced.sh

    r101 r105  
    9090</tr> 
    9191<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> 
    9297        <td align=\"right\"><span class=\"submenu${sel_reboot:+_sel}\"> 
    9398                <a href=\"/cgi-bin/webif/reboot.sh\">@TR<<Reboot>></a> 
     
    135140</tr> 
    136141<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> 
    137147        <td align=\"right\"><span class=\"submenu${sel_reboot:+_sel}\"> 
    138148                <a href=\"/cgi-bin/webif/reboot.sh\">@TR<<Reboot>></a> 
  • branches/stable/0.8/usr/lib/webif/lang/de/fon.txt

    r52 r105  
    587587LangSet => Hier kannst Du Deine Spracheinstellungen wÀhlen 
    588588 
     589########################## 
     590#  ../webif/fonupdate.sh # 
     591########################## 
     592 
     593#Fon Updates 
     594Fon Updates => Fon Updates 
     595 
     596#regular FON Updates 
     597FON Update Title => regulÀre FON Updates 
     598 
     599#Here you can see relevant updates ejected by FON. 
     600FON Updates => Hier kannst Du die nicht standardisierten Updates von FON sehen. 
     601 
     602#show 
     603Show => Anzeigen 
     604 
     605#execute 
     606Execute => AusfÃŒhren 
     607 
     608#Content of the file: 
     609FON Content => Inhalt der Datei: 
     610 
     611#The script has been executed successfully. 
     612FON Execute success => Das Script wurde erfolgreich ausgefÃŒhrt. 
     613 
     614#The script has been deleted successfully. 
     615FON Delete success => Das Script wurde erfolgreich gelöscht. 
     616 
     617#Check for Updates... 
     618FON Check => PrÃŒfe auf Updates... 
     619 
    589620################### 
    590621# ../webif/mac.sh #