shithub: plan9front

Download patch

ref: 5d0c3ab7df27403796b07e09ae74558083ce8a61
parent: 5e040b3a2bdc88eecc2465c181cb2d9f25b415dd
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Apr 10 09:01:09 EDT 2021

termrc, cpurc: silence /net/ether* error message when there are no ethernet devices

--- a/rc/bin/cpurc	Fri Apr  9 10:48:07 2021
+++ b/rc/bin/cpurc	Sat Apr 10 09:01:09 2021
@@ -59,7 +59,7 @@
 		addrs=`{ndb/query -a sys $sysname ether}
 		if(! ~ $#addrs 0){
 			for(ether in /net/ether*){
-				addr=`{cat $ether/addr}
+				addr=`{cat $ether/addr >[2]/dev/null}
 				switch($addr){
 				case $addrs
 					# try /lib/ndb first, then do dhcp/slaac
--- a/rc/bin/termrc	Fri Apr  9 10:48:07 2021
+++ b/rc/bin/termrc	Sat Apr 10 09:01:09 2021
@@ -60,7 +60,7 @@
 		addrs=`{ndb/query -a sys $sysname ether}
 		if(! ~ $#addrs 0){
 			for(ether in /net/ether*){
-				addr=`{cat $ether/addr}
+				addr=`{cat $ether/addr >[2]/dev/null}
 				switch($addr){
 				case $addrs
 					# try /lib/ndb first, then do dhcp/slaac