boot/net.rc: redirect grep error to /dev/null

Usb ethernet driver does not serve ifstats file,
so avoid this error showing up on the console.
This commit is contained in:
cinap_lenrek 2024-11-24 17:11:13 +00:00
parent a77fd25d90
commit b0f2f4e47d

View file

@ -1,7 +1,7 @@
#!/bin/rc
fn wifi{
if(grep -s '^essid: ' $1/ifstats){
if(grep -s '^essid: ' $1/ifstats >[2]/dev/null){
if(~ $#essid 0)
essid=`{grep '^essid: ' $1/ifstats >[2]/dev/null | sed 's/^essid: //; q'}
if(! ~ $#essid 0){