summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-12-04 21:56:13 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2019-12-04 21:56:13 +0100
commitc9570c14af7780384df818c94700dc8a18a29423 (patch)
tree38921c0dcd741d08efa3475b4455b8c5a3e9af56 /sys
parentf7db45e62852ba716539247e20eaaa027b5b1c67 (diff)
9/boot/net.rc: suppress error from grep if ethernet ifstats file is not found
this can happen with nusb/ether, which does not implement ifstats file.
Diffstat (limited to 'sys')
-rwxr-xr-xsys/src/9/boot/net.rc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/boot/net.rc b/sys/src/9/boot/net.rc
index 54d108eed..16d0505e1 100755
--- a/sys/src/9/boot/net.rc
+++ b/sys/src/9/boot/net.rc
@@ -10,7 +10,7 @@ fn confignet{
# setup wifi encryption if any
if(~ $1 ether && test -x /bin/aux/wpa){
- essid=`{grep '^essid: ' $2/ifstats | sed 's/^essid: //; q'}
+ essid=`{grep '^essid: ' $2/ifstats >[2]/dev/null | sed 's/^essid: //; q'}
if(! ~ $#essid 0){
if(! ~ $#wpapsk 0 || grep -s '^status: need authentication' $2/ifstats >[2]/dev/null){
x=(aux/wpa -s $"essid)