Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/milestone/fs-local
          +++ new/usr/src/cmd/svc/milestone/fs-local
↓ open down ↓ 45 lines elided ↑ open up ↑
  46   46          echo "$SMF_FMRI:" $msg >/dev/msglog
  47   47          result=$SMF_EXIT_ERR_FATAL
  48   48  fi
  49   49  rm -f /var/run/fs-local
  50   50  
  51   51  #
  52   52  # If there are non-global UFS filesystems with quotas, check and enable them.
  53   53  #
  54   54  
  55   55  # vlist is the non-global filesystems in vfstab requesting quotas
  56      -vlist=`/usr/bin/nawk '$1 !~ /^(#|-)/ && $4 == "ufs" {
       56 +vlist=`/usr/xpg4/bin/awk '$1 !~ /^(#|-)/ && $4 == "ufs" {
  57   57          if (match($7, "(^|,)(quota|rq)(,|$)") != 0 &&
  58   58              match($7, "(^|,)global(,|$)") == 0) print $1; }' /etc/vfstab`
  59   59  
  60   60  if [ -n "$vlist" ]; then
  61   61          # mlist is the filesystems in mnttab that are ufs, mounted rw,
  62   62          # and without quotas turned on
  63      -        mlist=`/usr/sbin/mount -p | /usr/bin/nawk '$4 == "ufs" {
       63 +        mlist=`/usr/sbin/mount -p | /usr/xpg4/bin/awk '$4 == "ufs" {
  64   64                  if (match($7, "(^|,)ro(,|$)") == 0) print $1; }'`
  65   65  
  66   66          # qlist is the intersection of vlist and mlist
  67   67          qlist=`echo "$vlist\n-\n$mlist" | \
  68      -                /usr/bin/nawk '{if ($1 == "-") { mlist = 1; }
       68 +                /usr/xpg4/bin/awk '{if ($1 == "-") { mlist = 1; }
  69   69                          else if (mlist == 0) { vlist[$1] = 1; }
  70   70                          else if (vlist[$1]) { print $1; } }'`
  71   71  
  72   72          #
  73   73          # Just check and enable the non-global UFS file systems with quotas
  74   74          # enabled. Note that "quotacheck -a" and "quotaon -a" will try
  75   75          # to process all UFS entries with quotas rather than excluding
  76   76          # the entries with the global option (the global entries are handled
  77   77          # later in another script if the cluster package is installed).
  78   78          #
↓ open down ↓ 37 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX