Print this page
XXX Remove nawk(1)
*** 44,54 ****
DOMAINNAME=/usr/bin/domainname
GREP=/usr/bin/grep
LDAPCLIENT=/usr/sbin/ldapclient
MKDIR=/usr/bin/mkdir
MV=/usr/bin/mv
! NAWK=/usr/bin/nawk
NWAMADM=/usr/sbin/nwamadm
NWAMCFG=/usr/sbin/nwamcfg
RM=/usr/bin/rm
SED=/usr/bin/sed
SVCADM=/usr/sbin/svcadm
--- 44,54 ----
DOMAINNAME=/usr/bin/domainname
GREP=/usr/bin/grep
LDAPCLIENT=/usr/sbin/ldapclient
MKDIR=/usr/bin/mkdir
MV=/usr/bin/mv
! 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,83 ****
#
# 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 '
$2 ~ /BOUND/ { printf "%s ", $1 }
$2 ~ /INFORMATION/ { printf "%s ", $1 }'
}
#
--- 73,83 ----
#
# 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 | $AWK '
$2 ~ /BOUND/ { printf "%s ", $1 }
$2 ~ /INFORMATION/ { printf "%s ", $1 }'
}
#
*** 213,234 ****
;;
esac
# Write DNS settings
if [ -n "$DNS_DOMAIN" ]; then
! echo "$DNS_DOMAIN" | $NAWK \
'{ for (i = 1; i <= NF; i++) \
print "domain ", $i }' >> $file.$$
fi
if [ -n "$DNS_SEARCH" ]; then
! echo "$DNS_SEARCH" | $NAWK \
'{ printf("search"); \
for (i = 1; i <= NF; i++) printf(" %s", $i); \
printf("\n") }' >> $file.$$
fi
if [ -n "$DNS_SERVERS" ]; then
! echo "$DNS_SERVERS" | $NAWK \
'{ for (i = 1; i <= NF; i++) \
print "nameserver ", $i }' >> $file.$$
fi
done
--- 213,234 ----
;;
esac
# Write DNS settings
if [ -n "$DNS_DOMAIN" ]; then
! echo "$DNS_DOMAIN" | $AWK \
'{ for (i = 1; i <= NF; i++) \
print "domain ", $i }' >> $file.$$
fi
if [ -n "$DNS_SEARCH" ]; then
! 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" | $AWK \
'{ for (i = 1; i <= NF; i++) \
print "nameserver ", $i }' >> $file.$$
fi
done
*** 271,281 ****
fi
;;
'dhcp')
# Use only the first name
DEFAULT_DOMAIN=`get_dhcpinfo NISdmain | \
! $NAWK '{ print $1 }'`
NIS_SERVERS=`get_dhcpinfo NISservs`
$DOMAINNAME $DEFAULT_DOMAIN
$DOMAINNAME > $ETC_DEFAULT_DOMAIN
;;
'*')
--- 271,281 ----
fi
;;
'dhcp')
# Use only the first name
DEFAULT_DOMAIN=`get_dhcpinfo NISdmain | \
! $AWK '{ print $1 }'`
NIS_SERVERS=`get_dhcpinfo NISservs`
$DOMAINNAME $DEFAULT_DOMAIN
$DOMAINNAME > $ETC_DEFAULT_DOMAIN
;;
'*')
*** 286,296 ****
# 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 \
'{ for (i = 1; i <= NF; i++) print $i }' \
> $NIS_BIND_PATH/$DEFAULT_DOMAIN/ypservers
fi
done
--- 286,296 ----
# 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" | $AWK \
'{ for (i = 1; i <= NF; i++) print $i }' \
> $NIS_BIND_PATH/$DEFAULT_DOMAIN/ypservers
fi
done