Ignore:
Timestamp:
2011-06-07T19:00:43+02:00 (6 years ago)
Author:
nbd
Message:

base-files: do not write to /etc/config/wireless at boot time unless a new interface was found

eliminates unnecessary flash write cycles at every boot

patch by Peter Wagner (tripolar)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/etc/init.d/network

    r26166 r27127  
    1010        include /lib/network 
    1111        setup_switch 
    12         /sbin/wifi detect >> /etc/config/wireless 
     12 
     13        /sbin/wifi detect > /tmp/wireless.tmp 
     14        [ -s /tmp/wireless.tmp ] && { 
     15                cat /tmp/wireless.tmp >> /etc/config/wireless 
     16        } 
     17        rm -f /tmp/wireless.tmp 
    1318        grep -qs config /etc/config/wireless && { 
    1419                /sbin/wifi up 
    15         } || { 
    16                 rm -f /etc/config/wireless 
    1720        } 
    1821 
Note: See TracChangeset for help on using the changeset viewer.