Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/lvm/util/svc-metasync
          +++ new/usr/src/cmd/lvm/util/svc-metasync
↓ 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 2006 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
  26      -# ident "%Z%%M% %I%     %E% SMI"
  27      -#
  28   26  # Start mirror resync threads.
  29   27  
  30   28  DEVFSADM=/usr/sbin/devfsadm
  31   29  METADEVADM=/usr/sbin/metadevadm
  32   30  METASYNC=/usr/sbin/metasync
  33   31  METADEV=/dev/md/admin
  34   32  METASET=/usr/sbin/metaset
  35   33  TMPFILE=/var/run/metaset.$$
  36   34  
  37   35  . /lib/svc/share/smf_include.sh
↓ open down ↓ 12 lines elided ↑ open up ↑
  50   48                  # Fixing up of the ctd names for devices in auto take
  51   49                  # sets relies heavily on the output of the metaset
  52   50                  # command. Any change to the output of the metaset command
  53   51                  # should modify this script as well in order ensure nothing
  54   52                  # breaks
  55   53                  #
  56   54                  # The following command saves all of the auto-take set names
  57   55                  # into the TMPFILE
  58   56                  name_str=`gettext "Set name"`
  59   57                  mn_str=`gettext "Multi-owner"` 
  60      -                $METASET | /bin/nawk -F ' |\t|,' -v snm="$name_str" \
       58 +                $METASET | /usr/xpg4/bin/awk -F ' |\t|,' -v snm="$name_str" \
  61   59                      -v mstr="$mn_str" '$0 ~ snm { \
  62   60                      if (index($0, mstr) == 0) print $4 \
  63   61                  }' > $TMPFILE 2>&1
  64   62  
  65   63                  if [ -s "$TMPFILE" ]; then
  66   64                          localised_string=`gettext "Yes (auto)"`
  67   65                          for i in `cat $TMPFILE`; do
  68   66                                  $METASET -s $i | grep "$localised_string" \
  69   67                                      > /dev/null 2>&1
  70   68                                  if [ $? -eq 0 ]; then
↓ open down ↓ 81 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX