git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turn the init.d scripts into autoconf config files
[zfs.git]
/
etc
/
init.d
/
zfs.lunar.in
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
(file)
--- 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
# 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"
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..."
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
echo -e "done";
else
echo -e "failed";
fi
- done < <(
zfs
list -H);
+ done < <(
$ZFS
list -H);
# export the filesystems
echo -n "exporting ZFS filesystems..."
# 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";
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...";
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
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
# and finally let's rmmod the module
rmmod zfs