cpurc: handle multiple auth servers
This commit is contained in:
parent
d52752fe68
commit
4080322dc9
1 changed files with 11 additions and 12 deletions
23
rc/bin/cpurc
23
rc/bin/cpurc
|
@ -94,21 +94,20 @@ if not if(test -d /cfg/default/service)
|
||||||
serviced=/cfg/default/service
|
serviced=/cfg/default/service
|
||||||
if not
|
if not
|
||||||
serviced=/rc/bin/service
|
serviced=/rc/bin/service
|
||||||
if(~ $#auth 0){
|
if(~ $#auth 0)
|
||||||
auth=`{ndb/query sys $sysname auth}
|
auth=`{ndb/ipquery sys $sysname auth | sed 's,auth=,,g'}
|
||||||
. <{ndb/ipquery sys $sysname auth | sed 's, +,\n,g'}
|
if(@{
|
||||||
}
|
for(a in `{ndb/ipquery sys $sysname ip sys dom | sed 's,(ip|sys|dom)=,,g'}){
|
||||||
switch($auth){
|
if(~ $a $auth)
|
||||||
case `{ echo $sysname; ndb/query sys $sysname dom
|
exit ''
|
||||||
if(test -r /net/ipselftab){
|
}
|
||||||
for(i in `{awk '/u\ *$/{print $1}' /net/ipselftab}){
|
exit 'no'
|
||||||
echo $i; ndb/ipquery ip $i dom; ndb/ipquery ip $i sys
|
}){
|
||||||
} | sed 's,[^ ]+=,,g'}}
|
|
||||||
|
|
||||||
# cpu+auth server
|
# cpu+auth server
|
||||||
auth/keyfs -wp -m /mnt/keys /adm/keys
|
auth/keyfs -wp -m /mnt/keys /adm/keys
|
||||||
aux/listen -q -t /rc/bin/service.auth -d $serviced tcp
|
aux/listen -q -t /rc/bin/service.auth -d $serviced tcp
|
||||||
case *
|
}
|
||||||
|
if not {
|
||||||
# cpu server
|
# cpu server
|
||||||
aux/listen -q -d $serviced tcp
|
aux/listen -q -d $serviced tcp
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue