Re: git: c068632981eb - main - Add ggated rc script
- Reply: Alan Somers : "Re: git: c068632981eb - main - Add ggated rc script"
- In reply to: Alan Somers : "git: c068632981eb - main - Add ggated rc script"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Feb 2022 10:11:49 UTC
On 28/02/2022 05:16, Alan Somers wrote: > The branch main has been updated by asomers: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c068632981ebb7521859e3d2c0ec300a271f9b7e > > commit c068632981ebb7521859e3d2c0ec300a271f9b7e > Author: Alan Somers <asomers@FreeBSD.org> > AuthorDate: 2022-02-28 04:14:52 +0000 > Commit: Alan Somers <asomers@FreeBSD.org> > CommitDate: 2022-02-28 04:14:52 +0000 > > Add ggated rc script > > Reviewed by: asomers, peterj > Submitted by: Johannes Totz <jo@bruelltuete.com> > Differential Revision: https://reviews.freebsd.org/D31709 > --- > libexec/rc/rc.conf | 3 +++ > libexec/rc/rc.d/Makefile | 1 + > libexec/rc/rc.d/ggated | 21 +++++++++++++++++++++ > 3 files changed, 25 insertions(+) > > diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf > index 1812b099530a..23a397c3b4ad 100644 > --- a/libexec/rc/rc.conf > +++ b/libexec/rc/rc.conf > @@ -296,6 +296,9 @@ iscsictl_flags="-Aa" # Optional flags to iscsictl. > hastd_enable="NO" # Run the HAST daemon (YES/NO). > hastd_program="/sbin/hastd" # path to hastd, if you want a different one. > hastd_flags="" # Optional flags to hastd. > +ggated_enable="NO" # Run the ggate daemon (YES/NO). > +ggated_config="/etc/gg.exports" > +ggated_params="" # Extra parameters like which port to bind to. Shouldn't _params be _flags instead? > diff --git a/libexec/rc/rc.d/ggated b/libexec/rc/rc.d/ggated > new file mode 100644 > index 000000000000..dc31468920ef > --- /dev/null > +++ b/libexec/rc/rc.d/ggated > @@ -0,0 +1,21 @@ > +#!/bin/sh > + > +# PROVIDE: ggated > +# REQUIRE: NETWORKING > + > +. /etc/rc.subr > + > +name="ggated" > +desc="GEOM Gate network daemon" > +rcvar="ggated_enable" > +command="/sbin/${name}" > +pidfile="/var/run/${name}.pid" > + > +load_rc_config $name > +params="${ggated_params}" > +config="${ggated_config:-/etc/gg.exports}" Is it necessary to set the default here again if it is already set in /etc/defaults/rc.conf? Best, Mateusz