Print this page
XXX Remove nawk(1)
@@ -44,11 +44,11 @@
DOMAINNAME=/usr/bin/domainname
GREP=/usr/bin/grep
LDAPCLIENT=/usr/sbin/ldapclient
MKDIR=/usr/bin/mkdir
MV=/usr/bin/mv
-NAWK=/usr/bin/nawk
+AWK=/usr/xpg4/bin/awk
NWAMADM=/usr/sbin/nwamadm
NWAMCFG=/usr/sbin/nwamcfg
RM=/usr/bin/rm
SED=/usr/bin/sed
SVCADM=/usr/sbin/svcadm
@@ -73,11 +73,11 @@
#
# 1. parse netstat(1M) output for v4 interfaces in BOUND
# or INFORMATION state
# 2. make a space-separated list of interface names
#
- netstat -D -f inet | $NAWK '
+ netstat -D -f inet | $AWK '
$2 ~ /BOUND/ { printf "%s ", $1 }
$2 ~ /INFORMATION/ { printf "%s ", $1 }'
}
#
@@ -213,22 +213,22 @@
;;
esac
# Write DNS settings
if [ -n "$DNS_DOMAIN" ]; then
- echo "$DNS_DOMAIN" | $NAWK \
+ echo "$DNS_DOMAIN" | $AWK \
'{ for (i = 1; i <= NF; i++) \
print "domain ", $i }' >> $file.$$
fi
if [ -n "$DNS_SEARCH" ]; then
- echo "$DNS_SEARCH" | $NAWK \
+ echo "$DNS_SEARCH" | $AWK \
'{ printf("search"); \
for (i = 1; i <= NF; i++) printf(" %s", $i); \
printf("\n") }' >> $file.$$
fi
if [ -n "$DNS_SERVERS" ]; then
- echo "$DNS_SERVERS" | $NAWK \
+ echo "$DNS_SERVERS" | $AWK \
'{ for (i = 1; i <= NF; i++) \
print "nameserver ", $i }' >> $file.$$
fi
done
@@ -271,11 +271,11 @@
fi
;;
'dhcp')
# Use only the first name
DEFAULT_DOMAIN=`get_dhcpinfo NISdmain | \
- $NAWK '{ print $1 }'`
+ $AWK '{ print $1 }'`
NIS_SERVERS=`get_dhcpinfo NISservs`
$DOMAINNAME $DEFAULT_DOMAIN
$DOMAINNAME > $ETC_DEFAULT_DOMAIN
;;
'*')
@@ -286,11 +286,11 @@
# Place NIS settings in appropriate directory/file.
if [ ! -d "$NIS_BIND_PATH/$DEFAULT_DOMAIN" ]; then
$MKDIR -p $NIS_BIND_PATH/$DEFAULT_DOMAIN
fi
if [ -n "$NIS_SERVERS" ]; then
- echo "$NIS_SERVERS" | $NAWK \
+ echo "$NIS_SERVERS" | $AWK \
'{ for (i = 1; i <= NF; i++) print $i }' \
> $NIS_BIND_PATH/$DEFAULT_DOMAIN/ypservers
fi
done