Changeset 5706


Ignorieren:
Zeitstempel:
03.09.2010 11:19:53 (vor 6 Jahren)
Autor:
oliver
Nachricht:
  • Remove variable MOD_LIMIT
    • max size for /var/flash/freetz is 32 KB (compressed)
    • so it makes no sense to check uncompressed size
    • refs #1004
Ort:
trunk
Dateien:
3 bearbeitet

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/CHANGELOG

    r5695 r5706  
    245245 
    246246- BusyBox: 
    247     * updated to 1.17.1 
     247    * updated to 1.17.2 
    248248 
    249249- Web interface: 
     
    266266      + show it only with security level 0 
    267267      + don't allow to execute any code by clicking on a wrong url 
     268    * Remove MOD_LIMIT variable 
     269      + compressed size of freetz config file must not be greater than 32 KB 
     270      + this is a tffs2 restriction 
    268271 
    269272 
  • trunk/root/etc/default.mod/mod.cfg

    r5600 r5706  
    44export MOD_HTTPD_PORT='81' 
    55export MOD_HTTPD_USER='admin' 
    6 export MOD_LIMIT='61440' 
    76export MOD_SWAP='no' 
    87export MOD_SWAP_FILE='' 
  • trunk/root/usr/bin/modsave

    r5507 r5706  
    66    TMPFILE=/tmp/.save.tmp 
    77 
    8     if [ -r /mod/etc/conf/mod.cfg ]; then 
    9         . /mod/etc/conf/mod.cfg 
    10     else 
    11         MOD_LIMIT=61440 
    12     fi 
     8    let MOD_LIMIT=32*1024 
    139 
    1410    # not really a lock 
     
    2016    tar -cf $TMPFILE flash -C /tmp/ 
    2117 
    22     let size=$(wc -c < $TMPFILE) 
     18    # compressed config size must be less than 32 KB 
     19    size=$(gzip -c $TMPFILE | wc -c) 
    2320 
    2421    if [ "$size" -gt "$MOD_LIMIT" ]; then 
     
    3027 
    3128    echo -n 'Writing /var/flash/freetz ... ' 
    32     cat $TMPFILE > /var/flash/freetz 
     29    cat $TMPFILE > /var/flash/freetz 2>/dev/null 
     30    local rv=$? 
    3331    rm -f $TMPFILE 
    34     echo 'done.' 
     32    if [ $rv -ne 0 ]; then 
     33        echo 'failed.' 
     34        echo 'Error: Could not save config file.' 
     35        exit $rv 
     36    fi 
    3537    echo "$size bytes written." 
    3638} 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.