From 1bf498612c5e7dac71c7c452677bce63ae369841 Mon Sep 17 00:00:00 2001 From: avg Date: Wed, 7 Aug 2013 07:32:56 +0000 Subject: [PATCH] MFC r253068: zfsboottest.sh: remove checks for things that are not strictly required git-svn-id: svn://svn.freebsd.org/base/stable/9@254037 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- tools/tools/zfsboottest/zfsboottest.sh | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tools/tools/zfsboottest/zfsboottest.sh b/tools/tools/zfsboottest/zfsboottest.sh index 1707e3f3e..1aea755e1 100755 --- a/tools/tools/zfsboottest/zfsboottest.sh +++ b/tools/tools/zfsboottest/zfsboottest.sh @@ -54,11 +54,6 @@ bootfs=`zpool get bootfs "${pool}" | tail -1 | awk '{print $3}'` if [ "${bootfs}" = "-" ]; then bootfs="${pool}" fi -# Dataset's mountpoint property should be set to 'legacy'. -if [ "`zfs get -H -o value mountpoint ${bootfs}`" != "legacy" ]; then - echo "The \"mountpoint\" property of dataset \"${bootfs}\" should be set to \"legacy\"." >&2 - exit 1 -fi mountpoint=`df -t zfs "${bootfs}" 2>/dev/null | tail -1 | awk '{print $6}'` if [ -z "${mountpoint}" ]; then echo "The \"${bootfs}\" dataset is not mounted." >&2 @@ -68,19 +63,6 @@ if [ ! -d "${mountpoint}${startdir}" ]; then echo "The \"${mountpoint}${startdir}\" directory doesn't exist." >&2 exit 1 fi -# To be able to mount root ZFS file system we need either /etc/fstab entry -# or vfs.root.mountfrom variable set in /boot/loader.conf. -egrep -q '^'"${bootfs}"'[[:space:]]+/[[:space:]]+zfs[[:space:]]+' "${mountpoint}/etc/fstab" 2>/dev/null -if [ $? -ne 0 ]; then - egrep -q 'vfs.root.mountfrom="?'"zfs:${bootfs}"'"?[[:space:]]*$' "${mountpoint}/boot/loader.conf" 2>/dev/null - if [ $? -ne 0 ]; then - echo "To be able to boot from \"${bootfs}\", you need to declare" >&2 - echo "\"${bootfs}\" as being root file system in ${mountpoint}/etc/fstab" >&2 - echo "or add \"vfs.root.mountfrom\" variable set to \"zfs:${bootfs}\" to" >&2 - echo "${mountpoint}/boot/loader.conf." >&2 - exit 1 - fi -fi vdevs="" for vdev in `zpool status "${pool}" | grep ONLINE | awk '{print $1}'`; do vdev="/dev/${vdev#/dev/}" -- 2.45.0