svn commit: r193112 - head/etc/rc.d
Dmitry Morozovsky
marck at rinet.ru
Mon Jun 1 07:28:17 UTC 2009
On Sun, 31 May 2009, Doug Barton wrote:
DB> > DB> > DB> As previously advertised, remove this script prior to the 8.0 branch.
DB> > DB> >
DB> > DB> > Was there an agreement what should one do with dumping to gmirror (see
DB> > DB> > sbin/geom/class/mirror/gmirror.8) ?
DB> > DB>
DB> > DB> I'm not familiar with that issue, but it sounds like something that
DB> > DB> needs its own rc.d script. If someone who knows what is supposed to
DB> > DB> happen wants to write something up and send it to the freebsd-rc@ list
DB> > DB> I'll be glad to help review it.
DB> >
DB> > Something like (checks should be added, yeah)
DB>
DB> This is fine, but for consistency with the other stuff in rc.d the
DB> name of the script, the value of $name, and the PROVIDE should all be
DB> the same. I would name it something like gmsc and in
DB> etc/defaults/rc.conf (and probably in the script itself) add a comment
DB> indicating what it's for.
DB>
DB> Not sure what you mean by "checks should be added," I'm not familiar
DB> with gmirror at all. But it looks like you're on the right track, yes.
Well, I'm ton very familiar with rc.d scripts rules, so I suppose I missed some
_rc.d_ checks, but corrected patch is attached.
I'm not sure where second part of gmirror configuring process belong though...
--
Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer: marck at FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------
-------------- next part --------------
Index: defaults/rc.conf
===================================================================
RCS file: /home/ncvs/src/etc/defaults/rc.conf,v
retrieving revision 1.356
diff -u -r1.356 rc.conf
--- defaults/rc.conf 22 May 2009 13:56:16 -0000 1.356
+++ defaults/rc.conf 1 Jun 2009 07:25:52 -0000
@@ -276,6 +276,7 @@
rwhod_enable="NO" # Run the rwho daemon (or NO).
rwhod_flags="" # Flags for rwhod
+rwhod_delay="0" # Delay in seconds before starting rwhod
rarpd_enable="NO" # Run rarpd (or NO).
rarpd_flags="-a" # Flags to rarpd.
bootparamd_enable="NO" # Run bootparamd (or NO).
@@ -546,8 +547,7 @@
dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO).
dumpdir="/var/crash" # Directory where crash dumps are to be stored
savecore_flags="" # Used if dumpdev is enabled above, and present.
-crashinfo_enable="YES" # Automatically generate crash dump summary.
-crashinfo_program="/usr/sbin/crashinfo" # Script to generate crash dump summary.
+gmsc_enable="NO" # If gmirror is used for dumps, prepare it for savecore
quota_enable="NO" # turn on quotas on startup (or NO).
check_quotas="YES" # Check quotas on startup (or NO).
quotaon_flags="-a" # Turn quotas on for all file systems (if enabled)
Index: rc.d/Makefile
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/Makefile,v
retrieving revision 1.97
diff -u -r1.97 Makefile
--- rc.d/Makefile 30 May 2009 19:38:51 -0000 1.97
+++ rc.d/Makefile 1 Jun 2009 07:25:52 -0000
@@ -11,7 +11,7 @@
dmesg dumpon \
encswap \
fsck ftp-proxy ftpd \
- gbde geli geli2 gssd \
+ gbde geli geli2 gmsc gssd \
hcsecd \
hostapd hostid hostname \
inetd initrandom \
Index: rc.d/gmsc
===================================================================
RCS file: rc.d/gmsc
diff -N rc.d/gmsc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ rc.d/gmsc 1 Jun 2009 07:25:52 -0000
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# BEFORE: savecore
+# PROVIDE: gmsc
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="gmsc"
+start_cmd="gmsc_start"
+stop_cmd=":"
+
+gmsavecore_start()
+{
+ gmirror configure -b prefer ${dumpdev}
+}
+
+load_rc_config $name
+run_rc_command "$1"
More information about the freebsd-rc
mailing list