EOF
}
+unload_die() {
+ unload_modules
+ while [ -c /dev/zpios ]; do
+ sleep 1
+ done
+
+ exit 1
+}
+
print_header() {
echo --------------------- ZPIOS RESULTS ----------------------------
echo -n "Date: "; date
check_test || die "${ERROR}"
. ${ZPIOS_TEST}
-# Pull in the zpios test module is not loaded. If this fails it is
+# Pull in the zpios test module if not loaded. If this fails, it is
# likely because the full module stack was not yet loaded with zfs.sh
if check_modules; then
if ! load_modules; then
# Create the zpool configuration
${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} ${FORCE_FLAG} \
-p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \
- -l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || exit 1
+ -l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || unload_die
if [ ${PROFILE} ]; then
zpios_profile_start
# Destroy the zpool configuration
${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} ${FORCE_FLAG} \
- -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || exit 1
+ -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || unload_die
# Unload the test module stack and wait for device removal
unload_modules