From 43ac8e212680fa5c57c0f93bad8c258f05d1cb4b Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 5 Nov 2013 09:59:13 +0100 Subject: [PATCH] 00-zfs.sh: move zfs_member fstype info to a standalone function --- defaults/initrd.d/00-zfs.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/defaults/initrd.d/00-zfs.sh b/defaults/initrd.d/00-zfs.sh index 7828770..8d44d17 100755 --- a/defaults/initrd.d/00-zfs.sh +++ b/defaults/initrd.d/00-zfs.sh @@ -11,9 +11,16 @@ is_zfs() { return 1 } +# This piece of information can be used by external +# functions to return the default filesystem type +# for zfs members. +zfs_member_fstype() { + echo "zfs_member" +} + is_zfs_fstype() { local fstype="${1}" - [ "${fstype}" = "zfs_member" ] && return 0 + [ "${fstype}" = "$(zfs_member_fstype)" ] && return 0 return 1 }