X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=etc%2Finit.d%2Fzfs.fedora.in;fp=etc%2Finit.d%2Fzfs.fedora;h=04f2077ceb418e36283efdb83a09a4fc27347f66;hb=5faa9c0367e8d6b1ee1c45f1ebeffd3e53ef35e8;hp=70b7281060107e1a5a02e01b0e5280504ded42c9;hpb=7f4afd300b753ee7e0ce1f8d12c098119193001b;p=zfs.git diff --git a/etc/init.d/zfs.fedora b/etc/init.d/zfs.fedora.in similarity index 96% rename from etc/init.d/zfs.fedora rename to etc/init.d/zfs.fedora.in index 70b7281..04f2077 100644 --- a/etc/init.d/zfs.fedora +++ b/etc/init.d/zfs.fedora.in @@ -30,8 +30,9 @@ export PATH=/usr/local/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin # 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 @@ -143,19 +144,19 @@ start() 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 @@ -169,7 +170,7 @@ start() string=`printf "$template" "$volume"` action "$string" mount "$volume" done - + touch "$LOCKFILE" } @@ -204,7 +205,7 @@ stop() # return 8 #fi #success - + rm -f "$LOCKFILE" }