Print this page
NEX-15891 Latest grep from illumos broke zvol_swap tests and swapadd
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/initpkg/swapadd.sh
          +++ new/usr/src/cmd/initpkg/swapadd.sh
↓ open down ↓ 137 lines elided ↑ open up ↑
 138  138                          swap -$PASS -a $special >/dev/null
 139  139                  fi
 140  140          else
 141  141                  #
 142  142                  # Pass 2 should skip all the swap already added.  If something
 143  143                  # added earlier uses the same name as something to be added
 144  144                  # later, the following test won't work. This should only happen
 145  145                  # if parts of a particular swap file are added or deleted by
 146  146                  # hand between invocations.
 147  147                  #
 148      -                swap -l 2>/dev/null | grep '\<'${special}'\>' >/dev/null 2>&1 \
      148 +                swap -l 2>/dev/null | grep -q "^$special " \
 149  149                      || swap -$PASS -a $special >/dev/null
 150  150          fi
 151  151  done
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX