# script variables
RETVAL=0
-ZPOOL=zpool
-ZFS=zfs
+ZFS="@sbindir@/zfs"
+ZPOOL="@sbindir@/zpool"
+ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
servicename=zfs
LOCKFILE=/var/lock/subsys/$servicename
fi
fi
- if [ -f /etc/zfs/zpool.cache ] ; then
-
+ if [ -f $ZPOOL_CACHE ] ; then
+
echo -n $"Importing ZFS pools not yet imported: "
- $ZPOOL import -c /etc/zfs/zpool.cache -aN || true # stupid zpool will fail if all pools are already imported
+ $ZPOOL import -c $ZPOOL_CACHE -aN || true # stupid zpool will fail if all pools are already imported
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
failure "Importing ZFS pools not yet imported: "
return 151
fi
success "Importing ZFS pools not yet imported: "
-
+
fi
-
+
action $"Mounting ZFS filesystems not yet mounted: " $ZFS mount -a || return 152
action $"Exporting ZFS filesystems: " $ZFS share -a || return 153
string=`printf "$template" "$volume"`
action "$string" mount "$volume"
done
-
+
touch "$LOCKFILE"
}
# return 8
#fi
#success
-
+
rm -f "$LOCKFILE"
}