Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/usr.sbin/routeadm/svc-legacy-routing
          +++ new/usr/src/cmd/cmd-inet/usr.sbin/routeadm/svc-legacy-routing
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  #
  23   23  # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
  26      -# ident "%Z%%M% %I%     %E% SMI"
  27   26  
  28   27  # This script is the shared method script for the legacy ipv4/ipv6
  29   28  # routing services.
  30   29  
  31   30  . /lib/svc/share/smf_include.sh
  32   31  
  33   32  daemon_prog=`/usr/sbin/svccfg -s $SMF_FMRI listprop routeadm/daemon | \
  34      -        /usr/bin/nawk '{ for (i = 3; i <= NF; i++) printf $i" " }' | \
  35      -        /usr/bin/nawk '{ sub(/^\"/,""); sub(/\"[ \t]*$/,""); print }'`
       33 +        /usr/xpg4/bin/awk '{ for (i = 3; i <= NF; i++) printf $i" " }' | \
       34 +        /usr/xpg4/bin/awk '{ sub(/^\"/,""); sub(/\"[ \t]*$/,""); print }'`
  36   35  daemon_args=`/usr/sbin/svccfg -s $SMF_FMRI listprop routeadm/daemon-args | \
  37      -        /usr/bin/nawk '{ for (i = 3; i <= NF; i++) printf $i" " }' | \
  38      -        /usr/bin/nawk '{ sub(/^\"/,""); sub(/\"[ \t]*$/,""); print }'`
       36 +        /usr/xpg4/bin/awk '{ for (i = 3; i <= NF; i++) printf $i" " }' | \
       37 +        /usr/xpg4/bin/awk '{ sub(/^\"/,""); sub(/\"[ \t]*$/,""); print }'`
  39   38  daemon_stop=`/usr/sbin/svccfg -s $SMF_FMRI listprop routeadm/daemon-stop-cmd | \
  40      -        /usr/bin/nawk '{ for (i = 3; i <= NF; i++) printf $i" " }' | \
  41      -        /usr/bin/nawk '{ sub(/^\"/,""); sub(/\"[ \t]*$/,""); print }'`
       39 +        /usr/xpg4/bin/awk '{ for (i = 3; i <= NF; i++) printf $i" " }' | \
       40 +        /usr/xpg4/bin/awk '{ sub(/^\"/,""); sub(/\"[ \t]*$/,""); print }'`
  42   41  
  43   42  method="$1"
  44   43  proto="$2"
  45   44  
  46   45  case "$method" in
  47   46  'start' )
  48   47          # No legacy daemon specified.
  49   48          if [ -z "$daemon_prog" ]; then
  50   49                  echo "${proto}-routing-daemon not specified by routeadm."
  51   50                  exit $SMF_EXIT_ERR_CONFIG
↓ open down ↓ 39 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX