mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
cpurc: use ndb/query -cia instead of ndb/ipquery
ndb/query -a already returns the value without the attribute name when given a single rattr so sed pipeline can be avoided. also use -c flag to query ndb/cs, which has a cache of the network database.
This commit is contained in:
parent
6500b30363
commit
ca672123ca
1 changed files with 3 additions and 3 deletions
|
@ -81,7 +81,7 @@ if(! test -e /net/dns)
|
|||
|
||||
if(! ps|grep -s timesync){
|
||||
if(~ $#ntp 0)
|
||||
. <{ndb/ipquery sys $sysname ntp | sed 's, +,\n,g'}
|
||||
ntp=`{ndb/query -cia sys $sysname ntp}
|
||||
if(~ $#ntp 0)
|
||||
ntp=pool.ntp.org
|
||||
aux/timesync -n $ntp
|
||||
|
@ -95,9 +95,9 @@ if not if(test -d /cfg/default/service)
|
|||
if not
|
||||
serviced=/rc/bin/service
|
||||
if(~ $#auth 0)
|
||||
auth=`{ndb/ipquery sys $sysname auth | sed 's,auth=,,g'}
|
||||
auth=`{ndb/query -cia sys $sysname auth}
|
||||
if(@{
|
||||
for(a in `{ndb/ipquery sys $sysname ip sys dom | sed 's,(ip|sys|dom)=,,g'}){
|
||||
for(a in $sysname `{ndb/query -cia sys $sysname ip} `{ndb/query -cia sys $sysname dom}){
|
||||
if(~ $a $auth)
|
||||
exit ''
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue