From owner-freebsd-stable@FreeBSD.ORG Tue Jan 25 09:50:35 2011 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B38D61065673; Tue, 25 Jan 2011 09:50:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 37BED8FC16; Tue, 25 Jan 2011 09:50:34 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p0P9Sw8F092088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Jan 2011 11:28:58 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p0P9Swca033554; Tue, 25 Jan 2011 11:28:58 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p0P9SwbO033553; Tue, 25 Jan 2011 11:28:58 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 25 Jan 2011 11:28:58 +0200 From: Kostik Belousov To: Eugene Grosbein Message-ID: <20110125092858.GJ2518@deviant.kiev.zoral.com.ua> References: <4D3E79D5.7050800@rdtc.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="koElQQqmLVmRs57w" Content-Disposition: inline In-Reply-To: <4D3E79D5.7050800@rdtc.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: stable@freebsd.org, rc@freebsd.org Subject: Re: Living on gmirror: need to reincarnate /etc/rc.early X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2011 09:50:35 -0000 --koElQQqmLVmRs57w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 25, 2011 at 01:20:53PM +0600, Eugene Grosbein wrote: > Hi! >=20 > In RELENG_8, gmirror is good enough to keep whole HDD pair withing the mi= rror. > Its performance, stability any pretty ease of maintainance allows > to use it widely. >=20 > With wide deployment of gmirror in production I've faced inability > of RELENG_8 to store kernel crashdumps out-of-the-box. > gmirror manual page documents a way to setup FreeBSD so that > it would store crashdumps again but that way involves /etc/rc.early > removed from RELENG_8. I've read about intentions - it was unsafe etc. > But we still need working crashdump support. >=20 > Easiest way is to reincarnate /etc/rc.d/early support making it better an= d safer > and it should support gmirror's mechanics for crashdumps out-of-the-box. >=20 > Comments? Yes, I have this change for eons. Actually, from the moment rc.early was booted out. diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 6f80b87..7981ce0 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -9,7 +9,7 @@ FILES=3D DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \ ccd cleanvar cleartmp cron \ ddb defaultroute devd devfs dhclient \ dmesg dumpon \ - encswap \ + early encswap \ faith fsck ftp-proxy ftpd \ gbde geli geli2 gptboot gssd \ hastd hcsecd \ diff --git a/etc/rc.d/early b/etc/rc.d/early new file mode 100755 index 0000000..8a863d0 --- /dev/null +++ b/etc/rc.d/early @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: early +# REQUIRE: disks localswap +# BEFORE: fsck + +# +# Support for legacy /etc/rc.early script +# +. /etc/rc.subr + +name=3D"early" +start_cmd=3D"early_start" +stop_cmd=3D":" + +early_start() +{ + if [ -r /etc/rc.early ]; then + echo -n 'Executing rc.early script:' + . /etc/rc.early + echo '.' + fi +} + +load_rc_config $name +run_rc_command "$1" --koElQQqmLVmRs57w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk0+l9oACgkQC3+MBN1Mb4jvYwCeOKqmWAMgZUD4CeclJeJziina mDIAoNURz8odYmmDyrKEqvRbhCR/SAL7 =4Qyo -----END PGP SIGNATURE----- --koElQQqmLVmRs57w--