Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/tsol/zones/zoneshare.sh
          +++ new/usr/src/cmd/tsol/zones/zoneshare.sh
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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  # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
  25      -#ident  "%Z%%M% %I%     %E% SMI"
  26      -#
  27   25  # zoneshare  -- share zone resources
  28   26  
  29   27  # Processes a non-global zone's dfstab file after translating
  30   28  # its zone-relative pathnames to global zone pathnames
  31   29  
  32   30  USAGE="zoneshare -z zonename [- | file]"
  33   31  set -- `getopt z: $*`
  34   32  if [ $? != 0 ]          # invalid options
  35   33          then
  36   34          echo $USAGE >&2
↓ open down ↓ 32 lines elided ↑ open up ↑
  69   67  fi
  70   68  
  71   69  # Prepend each exported pathname with the zone's rootpath
  72   70  # Skip over comments and lines without a share command
  73   71  # Run each share command in its own shell
  74   72  
  75   73  while read line                         # get complete lines
  76   74  do
  77   75          echo $line
  78   76  done < $infile |
  79      -        `egrep -v "(^[#])" | nawk  -v rootpath=$rootpath \
       77 +        `egrep -v "(^[#])" | /usr/xpg4/bin/awk -v rootpath=$rootpath \
  80   78              '/share/ { ORS = " "; for (i = 1; i < NF; i++) print $i ; \
  81   79               print rootpath $NF ";" } ' | /sbin/sh`
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX