From ce6a597ca105a032c7ceaa24e4de0bf793903c7d Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 3 May 2018 22:26:18 +0000 Subject: [PATCH] rc: emulate zfs_enable="YES" #2386 --- src/etc/rc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index 93bc710fd..e0d920b4f 100755 --- a/src/etc/rc +++ b/src/etc/rc @@ -90,14 +90,18 @@ while read FS_PART FS_MNT FS_TYPE FS_MORE; do fi done < /etc/fstab -if kldstat -qm zfs; then - zfs set readonly=off zroot -fi - attempts=0 while [ ${attempts} -lt 3 ]; do fsck -C -y / fsck -C -y / + if kldstat -qm zfs; then + zfs set readonly=off zroot + zfs mount -va + zfs share -a + if [ ! -r /etc/zfs/exports ]; then + touch /etc/zfs/exports + fi + fi if mount -a 2> /dev/null; then # bail if all is well break