dumpdev in loader.conf vs rc.d/dumpon
Andriy Gapon
avg at FreeBSD.org
Thu Sep 24 12:26:00 UTC 2015
On 24/09/2015 14:56, Andrey V. Elsukov wrote:
> 1. If you did set dumpdev from loader prompt or from /boot/loader.conf,
> and you didn't configured it in rc.conf, then this choice will be
> applied by geom_dev. Then it will be applied again by rc.d/dumpon.
>
> 2. If you did set dumpdev from loader prompt or from /boot/loader.conf,
> and you did configured it in rc.conf, then first of will be selected
> dumpdev from loader, then will be selected one from rc.conf.
>
> 3. If you didn't set dumpdev from loader prompt or from
> /boot/loader.conf, and you didn't configured it in rc.conf, then one of
> swap partition will be selected.
>
> In the end we can see, if we apply the following patch, then nothing
> will be affected.
I like this.
> Index: dumpon
> ===================================================================
> --- dumpon (revision 288047)
> +++ dumpon (working copy)
> @@ -34,11 +34,6 @@ dumpon_start()
> [Nn][Oo] | '')
> ;;
> [Aa][Uu][Tt][Oo])
> - dev=$(/bin/kenv -q dumpdev)
> - if [ -n "${dev}" ] ; then
> - dumpon_try "${dev}"
> - return $?
> - fi
> while read dev mp type more ; do
> [ "${type}" = "swap" ] || continue
> [ -c "${dev}" ] || continue
>
>
> PS. loader(8) has many variables where device name is used, and none of
> them uses /dev/ prefix.
>
--
Andriy Gapon
More information about the freebsd-current
mailing list