shithub: riscv

Download patch

ref: 759651e8a941378d89589d1084913c69bd5aeac4
parent: 9dee37a2b04641e1200eb639c2e7e303bbde6b9c
author: aiju <devnull@localhost>
date: Wed Apr 19 05:00:44 EDT 2017

change cpurc to look for service folder in /cfg/$sysname and /cfg/default

--- a/rc/bin/cpurc
+++ b/rc/bin/cpurc
@@ -72,6 +72,12 @@
 	auth=`{ndb/query sys $sysname auth}
 	. <{ndb/ipquery sys $sysname auth | sed 's, +,\n,g'}
 }
+if(test -d /cfg/$sysname/service)
+	serviced=/cfg/$sysname/service
+if not if(test -d /cfg/default/service)
+	serviced=/cfg/default/service
+if not
+	serviced=/rc/bin/service
 switch($auth){
 case `{	echo $sysname; ndb/query sys $sysname dom
 	if(test -r /net/ipselftab){
@@ -81,10 +87,10 @@
 
 	# cpu+auth server
 	auth/keyfs -wp -m /mnt/keys /adm/keys
-	aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service tcp
+	aux/listen -q -t /rc/bin/service.auth -d $serviced tcp
 case *
 	# cpu server
-	aux/listen -q -d /rc/bin/service tcp
+	aux/listen -q -d $serviced tcp
 }
 
 if(test -f /dev/apm)