my private gentoo overlay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
582 B

#!/bin/sh
ZFS="@sbindir@/zfs"
ZPOOL="@sbindir@/zpool"
ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
if [ -f "${ZPOOL_CACHE}" ]; then
"${ZPOOL}" import -c "${ZPOOL_CACHE}" -aN 2>/dev/null
if [ "${?}" != "0" ]; then
echo "Failed to import not-yet imported pools." >&2
fi
fi
echo "Mounting ZFS filesystems"
"${ZFS}" mount -a
if [ "${?}" != "0" ]; then
echo "Failed to mount ZFS filesystems." >&2
exit 1
fi
echo "Exporting ZFS filesystems"
"${ZFS}" share -a
if [ "${?}" != "0" ]; then
echo "Failed to export ZFS filesystems." >&2
exit 1
fi
exit 0