X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=etc%2Finit.d%2Fzfs.arch.in;fp=etc%2Finit.d%2Fzfs.arch;h=de2ea8a2d91da096a62e7b7f39af90d0c4bf1da1;hb=5faa9c0367e8d6b1ee1c45f1ebeffd3e53ef35e8;hp=c0fb209a96e2074f1b5a28d2e0b0a573e3bd9d7d;hpb=7f4afd300b753ee7e0ce1f8d12c098119193001b;p=zfs.git diff --git a/etc/init.d/zfs.arch b/etc/init.d/zfs.arch.in similarity index 76% rename from etc/init.d/zfs.arch rename to etc/init.d/zfs.arch.in index c0fb209..de2ea8a 100644 --- a/etc/init.d/zfs.arch +++ b/etc/init.d/zfs.arch.in @@ -3,6 +3,10 @@ . /etc/rc.conf . /etc/rc.d/functions +ZFS="@sbindir@/zfs" +ZPOOL="@sbindir@/zpool" +ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache" + case "$1" in start) stat_busy "Starting zfs" @@ -16,8 +20,8 @@ case "$1" in fi # Import ZFS pools (via cache file) - if [ -f /etc/zfs/zpool.cache ]; then - /usr/sbin/zpool import -c /etc/zfs/zpool.cache -aN 2>/dev/null + if [ -f $ZPOOL_CACHE ]; then + $ZPOOL import -c $ZPOOL_CACHE -aN 2>/dev/null if [ $? -ne 0 ]; then stat_fail exit 1 @@ -25,14 +29,14 @@ case "$1" in fi # Mount ZFS filesystems - /usr/sbin/zfs mount -a + $ZFS mount -a if [ $? -ne 0 ]; then stat_fail exit 1 fi # Export ZFS flesystems - /usr/sbin/zfs share -a + $ZFS share -a if [ $? -ne 0 ]; then stat_fail exit 1 @@ -43,7 +47,7 @@ case "$1" in ;; stop) stat_busy "Stopping zfs" - zfs umount -a + $ZFS umount -a rm_daemon zfs stat_done ;;