Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/shell/net_include.sh
          +++ new/usr/src/cmd/svc/shell/net_include.sh
↓ open down ↓ 711 lines elided ↑ open up ↑
 712  712  # corresponding base datalink entries to check for ones without a
 713  713  # "default_tag" property.
 714  714  #
 715  715  update_pvid()
 716  716  {
 717  717          datalink=/etc/dladm/datalink.conf
 718  718  
 719  719          (
 720  720                  # Find datalinks using VLAN 1 explicitly
 721  721                  # configured by dladm
 722      -                /usr/bin/nawk '
      722 +                /usr/xpg4/bin/awk '
 723  723                          /^#/ || NF < 2 { next }
 724  724                          { linkdata[$1]=$2; }
 725  725                          /;vid=int,1;/ {
 726  726                                  sub(/.*;linkover=int,/, "", $2);
 727  727                                  sub(/;.*/, "", $2);
 728  728                                  link=linkdata[$2];
 729  729                                  sub(/name=string,/, "", link);
 730  730                                  sub(/;.*/, "", link);
 731  731                                  print link;
 732  732                          }' $datalink
 733      -        ) | ( /usr/bin/sort -u; echo END; cat $datalink ) | /usr/bin/nawk '
      733 +        ) | ( /usr/bin/sort -u; echo END; cat $datalink ) | /usr/xpg4/bin/awk '
 734  734              /^END$/ { state=1; }
 735  735              state == 0 { usingpvid[++nusingpvid]=$1; next; }
 736  736              /^#/ || NF < 2 { next; }
 737  737              {
 738  738                  # If it is already present and has a tag set,
 739  739                  # then believe it.
 740  740                  if (!match($2, /;default_tag=/))
 741  741                          next;
 742  742                  sub(/name=string,/, "", $2);
 743  743                  sub(/;.*/, "", $2);
↓ open down ↓ 148 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX