X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=etc%2Finit.d%2Fzfs.lunar.in;fp=etc%2Finit.d%2Fzfs.lunar;h=97384dc833aa5ea02d5d891e4b9df2851988e92d;hb=5faa9c0367e8d6b1ee1c45f1ebeffd3e53ef35e8;hp=bdc461af861b258dfc9dda6ebee254e78788e580;hpb=7f4afd300b753ee7e0ce1f8d12c098119193001b;p=zfs.git diff --git a/etc/init.d/zfs.lunar b/etc/init.d/zfs.lunar.in similarity index 89% rename from etc/init.d/zfs.lunar rename to etc/init.d/zfs.lunar.in index bdc461a..97384dc 100644 --- a/etc/init.d/zfs.lunar +++ b/etc/init.d/zfs.lunar.in @@ -10,6 +10,10 @@ # 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" @@ -35,16 +39,16 @@ case $1 in 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"; @@ -60,14 +64,14 @@ case $1 in 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