aboutsummaryrefslogtreecommitdiffstats
path: root/etc/init.d
diff options
context:
space:
mode:
authorGunnar Beutner <[email protected]>2011-07-03 02:43:25 +0200
committerBrian Behlendorf <[email protected]>2011-07-06 09:20:28 -0700
commit8b0cf399ff9e764a08faea654bd30043a861cb09 (patch)
tree0fc84e50570ada53b94373aff287b6f40fad5d00 /etc/init.d
parent3c9609b322db2925aff628217eca9297d6fb569b (diff)
Updated init scripts to enable automatic sharing of ZFS datasets.
The relevant init scripts were updated so as to automatically share ZFS datasets using "zfs share -a" at boot time. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'etc/init.d')
-rw-r--r--etc/init.d/zfs.fedora2
-rw-r--r--etc/init.d/zfs.gentoo9
-rw-r--r--etc/init.d/zfs.lsb4
-rw-r--r--etc/init.d/zfs.lunar8
-rw-r--r--etc/init.d/zfs.redhat2
5 files changed, 25 insertions, 0 deletions
diff --git a/etc/init.d/zfs.fedora b/etc/init.d/zfs.fedora
index bfed452ad..70b728106 100644
--- a/etc/init.d/zfs.fedora
+++ b/etc/init.d/zfs.fedora
@@ -158,6 +158,8 @@ start()
action $"Mounting ZFS filesystems not yet mounted: " $ZFS mount -a || return 152
+ action $"Exporting ZFS filesystems: " $ZFS share -a || return 153
+
read_mtab "^/dev/zd"
read_fstab "^/dev/zd"
diff --git a/etc/init.d/zfs.gentoo b/etc/init.d/zfs.gentoo
index d7e1d1055..f709ed9e7 100644
--- a/etc/init.d/zfs.gentoo
+++ b/etc/init.d/zfs.gentoo
@@ -77,6 +77,15 @@ start() {
return $rv
fi
+ einfo "Exporting ZFS filesystems"
+ $ZFS share -a
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ eerror "Failed to export ZFS filesystems."
+ eend $rv
+ return $rv
+ fi
+
eend 0
return 0
}
diff --git a/etc/init.d/zfs.lsb b/etc/init.d/zfs.lsb
index c342a6b5c..ce541a9cd 100644
--- a/etc/init.d/zfs.lsb
+++ b/etc/init.d/zfs.lsb
@@ -74,6 +74,10 @@ start()
log_begin_msg "Mounting ZFS filesystems"
$ZFS mount -a
log_end_msg $?
+
+ log_begin_msg "Exporting ZFS filesystems"
+ $ZFS share -a
+ log_end_msg $?
fi
touch $LOCKFILE
diff --git a/etc/init.d/zfs.lunar b/etc/init.d/zfs.lunar
index c77b2b780..bdc461af8 100644
--- a/etc/init.d/zfs.lunar
+++ b/etc/init.d/zfs.lunar
@@ -42,6 +42,14 @@ case $1 in
fi
done < <(zfs list -H);
+ # export the filesystems
+ echo -n "exporting ZFS filesystems..."
+ if zfs share -a; then
+ echo -e "done";
+ else
+ echo -e "failed";
+ fi
+
;;
diff --git a/etc/init.d/zfs.redhat b/etc/init.d/zfs.redhat
index 3f34f2feb..c1f2fb833 100644
--- a/etc/init.d/zfs.redhat
+++ b/etc/init.d/zfs.redhat
@@ -87,6 +87,8 @@ start()
action $"Mounting automounted ZFS filesystems: " $ZFS mount -a || return 152
+ action $"Exporting ZFS filesystems: " $ZFS share -a || return 153
+
# Read fstab, try to mount zvols ignoring error
read_fstab "^/dev/(zd|zvol)"
template=$"Mounting volume %s registered in fstab: "