--- savecore.orig 2014-04-29 14:01:01.927926553 -0500 +++ savecore 2014-05-27 16:50:58.374187973 -0500 @@ -52,11 +52,18 @@ savecore_start() { local dev + local mirror_balance case "${dumpdev}" in [Aa][Uu][Tt][Oo]) dev= ;; + /dev/mirror/*) + mirror_balance=`gmirror list ${dumpdev#/dev/mirror/} | grep ^Balance:` + mirror_balance=${mirror_balance#Balance: } + gmirror configure -b prefer ${dumpdev#/dev/mirror/} + dev="${dumpdev}" + ;; *) dev="${dumpdev}" ;; @@ -70,6 +77,10 @@ else check_startmsgs && echo 'No core dumps found.' fi + + if [ -n "${mirror_balance}" ]; then + gmirror configure -b ${mirror_balance} ${dumpdev#/dev/mirror/} + fi } load_rc_config $name