Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ypcmd/ypstart.sh
          +++ new/usr/src/cmd/ypcmd/ypstart.sh
↓ 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  # Enable appropriate NIS daemons based on the current configuration.
  29   27  
  30   28  enable () {
  31   29          /usr/sbin/svcadm enable -t $1
  32   30          [ $? = 0 ] || echo "ypstart: unable to enable $1"
  33   31  
  34   32          if [ "`/usr/bin/svcprop -p restarter/state $1`" = "maintenance" ]; then
  35   33                  echo "ypstart: unable to enable $1; in maintenance"
  36   34          fi
  37   35  }
↓ open down ↓ 21 lines elided ↑ open up ↑
  59   57  
  60   58          YP_SERVER=TRUE  # remember we're a server for later
  61   59  
  62   60          # check to see if we are the master
  63   61          if [ -f /var/yp/NISLDAPmapping ]; then
  64   62                  passwdfile=/var/yp/$domain/LDAP_passwd.byname
  65   63          else
  66   64                  passwdfile=/var/yp/$domain/passwd.byname
  67   65          fi
  68   66          master=`/usr/sbin/makedbm -u $passwdfile | grep YP_MASTER_NAME \
  69      -            | nawk '{ print tolower($2) }'`
       67 +            | /usr/xpg4/bin/awk '{ print tolower($2) }'`
  70   68  fi
  71   69  
  72   70  # Enabling the YP client is not strictly necessary, but it is
  73   71  # traditional.
  74   72  state=`/usr/bin/svcprop -p restarter/state network/nis/client:default`
  75   73  
  76   74  [ "$state" = "disabled" ] && if [ -n "`pgrep -z $zone ypbind`" ]; then
  77   75          echo "ypstart: ypbind already running?"
  78   76  fi
  79   77  
↓ open down ↓ 28 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX