diff options
| author | Chuck Tuffli <chuck@FreeBSD.org> | 2021-03-05 16:13:23 +0000 |
|---|---|---|
| committer | Chuck Tuffli <chuck@FreeBSD.org> | 2021-04-05 16:25:04 +0000 |
| commit | f30f11f878fe2aa535cd286810d31c92793a3d95 (patch) | |
| tree | 5c746ecc6aa0a247dcbf8a3f9f56662b3eb4e229 /libexec | |
| parent | 015351de04e3e621cff825cc1fdad5faf078c3ac (diff) | |
Diffstat (limited to 'libexec')
| -rwxr-xr-x | libexec/rc/rc.d/dumpon | 2 | ||||
| -rwxr-xr-x | libexec/rc/rc.d/zpool | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libexec/rc/rc.d/dumpon b/libexec/rc/rc.d/dumpon index dddbf2af01cc..752f52315f49 100755 --- a/libexec/rc/rc.d/dumpon +++ b/libexec/rc/rc.d/dumpon @@ -42,6 +42,7 @@ dumpon_start() [Nn][Oo] | '') ;; [Aa][Uu][Tt][Oo]) + root_hold_wait dev=$(/bin/kenv -q dumpdev) if [ -n "${dev}" ] ; then dumpon_try "${dev}" @@ -56,6 +57,7 @@ dumpon_start() return 1 ;; *) + root_hold_wait dumpon_try "${dumpdev}" ;; esac diff --git a/libexec/rc/rc.d/zpool b/libexec/rc/rc.d/zpool index f98693f2cb13..e73c2b7e5b73 100755 --- a/libexec/rc/rc.d/zpool +++ b/libexec/rc/rc.d/zpool @@ -22,7 +22,14 @@ zpool_start() for cachefile in /etc/zfs/zpool.cache /boot/zfs/zpool.cache; do if [ -r $cachefile ]; then - zpool import -c $cachefile -a -N && break + zpool import -c $cachefile -a -N + if [ $? -ne 0 ]; then + echo "Import of zpool cache ${cachefile} failed," \ + "will retry after root mount hold release" + root_hold_wait + zpool import -c $cachefile -a -N + fi + break fi done } |
