Date: Tue, 25 Jan 2011 11:28:58 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Eugene Grosbein <egrosbein@rdtc.ru> Cc: stable@freebsd.org, rc@freebsd.org Subject: Re: Living on gmirror: need to reincarnate /etc/rc.early Message-ID: <20110125092858.GJ2518@deviant.kiev.zoral.com.ua> In-Reply-To: <4D3E79D5.7050800@rdtc.ru> References: <4D3E79D5.7050800@rdtc.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110125092858.GJ2518>
