# using SPL (Solaris Porting Layer) by zfsonlinux.org.
# probe: true
+ZFS="@sbindir@/zfs"
+ZPOOL="@sbindir@/zpool"
+ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
+
case $1 in
start) echo "$1ing ZFS filesystems"
while IFS= read -r -d $'\n' dev; do
mdev=$(echo "$dev" | awk '{ print $1; }')
echo -n "mounting $mdev..."
- if zfs mount $mdev; then
+ if $ZFS mount $mdev; then
echo -e "done";
else
echo -e "failed";
fi
- done < <(zfs list -H);
+ done < <($ZFS list -H);
# export the filesystems
echo -n "exporting ZFS filesystems..."
- if zfs share -a; then
+ if $ZFS share -a; then
echo -e "done";
else
echo -e "failed";
while IFS= read -r -d $'\n' dev; do
mdev=$(echo "$dev" | awk '{ print $1 }');
echo -n "umounting $mdev...";
- if zfs umount $mdev; then
+ if $ZFS umount $mdev; then
echo -e "done";
else
echo -e "failed";
fi
# the next line is, because i have to reverse the
# output, otherwise it wouldn't work as it should
- done < <(zfs list -H | tac);
+ done < <($ZFS list -H | tac);
# and finally let's rmmod the module
rmmod zfs