128 # matching the swap file about to be added.
129 #
130 # NB: This won't work correctly if the file to added
131 # for swapping is a sub-directory of the mountpoint.
132 # e.g. swapfile-> servername:/export/swap/clientname
133 # mountpoint-> servername:/export/swap
134 #
135 checkmount $special
136 fi
137 if [ -f $special -a -w $special -o -b $special ]; then
138 swap -$PASS -a $special >/dev/null
139 fi
140 else
141 #
142 # Pass 2 should skip all the swap already added. If something
143 # added earlier uses the same name as something to be added
144 # later, the following test won't work. This should only happen
145 # if parts of a particular swap file are added or deleted by
146 # hand between invocations.
147 #
148 swap -l 2>/dev/null | grep '\<'${special}'\>' >/dev/null 2>&1 \
149 || swap -$PASS -a $special >/dev/null
150 fi
151 done
|
128 # matching the swap file about to be added.
129 #
130 # NB: This won't work correctly if the file to added
131 # for swapping is a sub-directory of the mountpoint.
132 # e.g. swapfile-> servername:/export/swap/clientname
133 # mountpoint-> servername:/export/swap
134 #
135 checkmount $special
136 fi
137 if [ -f $special -a -w $special -o -b $special ]; then
138 swap -$PASS -a $special >/dev/null
139 fi
140 else
141 #
142 # Pass 2 should skip all the swap already added. If something
143 # added earlier uses the same name as something to be added
144 # later, the following test won't work. This should only happen
145 # if parts of a particular swap file are added or deleted by
146 # hand between invocations.
147 #
148 swap -l 2>/dev/null | grep -q "^$special " \
149 || swap -$PASS -a $special >/dev/null
150 fi
151 done
|