From owner-freebsd-current@freebsd.org Thu Sep 24 12:26:00 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 491ACA07BFB; Thu, 24 Sep 2015 12:26:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 20DBD10A0; Thu, 24 Sep 2015 12:25:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA12693; Thu, 24 Sep 2015 15:25:49 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Zf5av-000DEK-Fy; Thu, 24 Sep 2015 15:25:49 +0300 Subject: Re: dumpdev in loader.conf vs rc.d/dumpon To: "Andrey V. Elsukov" , Slawa Olhovchenkov References: <5602B922.20703@FreeBSD.org> <5602CDBC.7080906@FreeBSD.org> <5602DA17.7060501@FreeBSD.org> <5603B415.2090405@yandex.ru> <20150924111850.GA3158@zxy.spb.ru> <5603DE11.7010008@yandex.ru> <20150924113714.GQ21849@zxy.spb.ru> <5603E083.9020505@yandex.ru> <20150924114554.GR21849@zxy.spb.ru> <5603E507.4030203@yandex.ru> Cc: cem@FreeBSD.org, FreeBSD Current , freebsd-rc@FreeBSD.org From: Andriy Gapon Message-ID: <5603EB94.7010202@FreeBSD.org> Date: Thu, 24 Sep 2015 15:24:52 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5603E507.4030203@yandex.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 12:26:00 -0000 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