Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/brand/solaris10/zone/common.ksh
          +++ new/usr/src/lib/brand/solaris10/zone/common.ksh
↓ open down ↓ 98 lines elided ↑ open up ↑
  99   99          if [[ "$SANITY_SKIP" == 1 ]]; then
 100  100                  log "$w_sanity_detail"
 101  101                  return
 102  102          fi
 103  103  
 104  104          #
 105  105          # Check image release to be sure its S10.
 106  106          #
 107  107          image_vers="unknown"
 108  108          if [[ -f $dir/var/sadm/system/admin/INST_RELEASE ]]; then
 109      -                image_vers=$(nawk -F= '{if ($1 == "VERSION") print $2}' \
      109 +                image_vers=$(/usr/xpg4/bin/awk -F= '{if ($1 == "VERSION") print $2}' \
 110  110                      $dir/var/sadm/system/admin/INST_RELEASE)
 111  111          fi
 112  112  
 113  113          if [[ "$image_vers" != "10" ]]; then
 114  114                  log "$f_sanity_vers" "$image_vers"
 115  115                  res=1
 116  116          fi
 117  117  
 118  118          #
 119  119          # Make sure we have the minimal KU patch we support.  These are the
↓ open down ↓ 12 lines elided ↑ open up ↑
 132  132                          res=1
 133  133                  fi
 134  134          done
 135  135  
 136  136          #
 137  137          # Check the core kernel pkg for the required KU patch.
 138  138          #
 139  139          found=0
 140  140          for i in $dir/var/sadm/pkg/SUNWcakr*/pkginfo
 141  141          do
 142      -                patches=$(nawk -F= '{if ($1 == "PATCHLIST") print $2}' $i)
      142 +                patches=$(/usr/xpg4/bin/awk -F= '{if ($1 == "PATCHLIST") print $2}' $i)
 143  143                  for patch in $patches
 144  144                  do
 145  145                          if [[ $patch == $req_patch ]]; then
 146  146                                  found=1
 147  147                                  break
 148  148                          fi
 149  149                  done
 150  150  
 151  151                  if (( $found == 1 )); then
 152  152                          break
↓ open down ↓ 153 lines elided ↑ open up ↑
 306  306          return 0
 307  307  }
 308  308  
 309  309  #
 310  310  # Get zone's uuid for service tag.
 311  311  #
 312  312  get_inst_uuid()
 313  313  {
 314  314          typeset ZONENAME="$1"
 315  315  
 316      -        ZONEUUID=`zoneadm -z $ZONENAME list -p | nawk -F: '{print $5}'`
      316 +        ZONEUUID=`zoneadm -z $ZONENAME list -p | /usr/xpg4/bin/awk -F: '{print $5}'`
 317  317          [[ $? -ne 0 || -z $ZONEUUID ]] && return 1
 318  318  
 319  319          INSTANCE_UUID="urn:st:${ZONEUUID}"
 320  320          return 0
 321  321  }
 322  322  
 323  323  #
 324  324  # Add a service tag for a given zone.  We use two UUIDs-- the first,
 325  325  # the Product UUID, comes from the Sun swoRDFish ontology.  The second
 326  326  # is the UUID of the zone itself, which forms the instance UUID.
↓ open down ↓ 53 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX