X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/898495ff4119ba55eafec7cde97d4d6def209a71..b7d3d9d3cef2286b7266dc447265a0a21565b9b9:/package/base-files/files/etc/init.d/network?ds=sidebyside diff --git a/package/base-files/files/etc/init.d/network b/package/base-files/files/etc/init.d/network index c2095a4f5..fc512216f 100755 --- a/package/base-files/files/etc/init.d/network +++ b/package/base-files/files/etc/init.d/network @@ -9,11 +9,14 @@ boot() { include /lib/network setup_switch - /sbin/wifi detect >> /etc/config/wireless + + /sbin/wifi detect > /tmp/wireless.tmp + [ -s /tmp/wireless.tmp ] && { + cat /tmp/wireless.tmp >> /etc/config/wireless + } + rm -f /tmp/wireless.tmp grep -qs config /etc/config/wireless && { /sbin/wifi up - } || { - rm -f /etc/config/wireless } scan_interfaces