diff mbox

[4/4] init/FreeBSD: add rc control variables

Message ID 20161219150204.4481-5-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monne Dec. 19, 2016, 3:02 p.m. UTC
Those are used in order to decide which scripts are executed at init.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/hotplug/FreeBSD/rc.d/xencommons.in      | 5 ++++-
 tools/hotplug/FreeBSD/rc.d/xendriverdomain.in | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

Comments

Wei Liu Dec. 21, 2016, 11:49 a.m. UTC | #1
On Mon, Dec 19, 2016 at 03:02:04PM +0000, Roger Pau Monne wrote:
> Those are used in order to decide which scripts are executed at init.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>


Can't say I know much about FreeBSD init mechanism, but I trust your
judgement:

Acked-by: Wei Liu <wei.liu2@citrix.com>
Roger Pau Monne Dec. 21, 2016, 12:12 p.m. UTC | #2
On Wed, Dec 21, 2016 at 11:49:29AM +0000, Wei Liu wrote:
> On Mon, Dec 19, 2016 at 03:02:04PM +0000, Roger Pau Monne wrote:
> > Those are used in order to decide which scripts are executed at init.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> 
> Can't say I know much about FreeBSD init mechanism, but I trust your
> judgement:
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

Not that I know a lot myself, I just followed the advice at

https://www.freebsd.org/doc/en/articles/rc-scripting/article.html#rcng-confdummy

Maybe we should add this url ref to the commit itself?

Thanks, Roger.
Wei Liu Dec. 21, 2016, 4:38 p.m. UTC | #3
On Wed, Dec 21, 2016 at 12:12:06PM +0000, Roger Pau Monne wrote:
> On Wed, Dec 21, 2016 at 11:49:29AM +0000, Wei Liu wrote:
> > On Mon, Dec 19, 2016 at 03:02:04PM +0000, Roger Pau Monne wrote:
> > > Those are used in order to decide which scripts are executed at init.
> > > 
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > 
> > 
> > Can't say I know much about FreeBSD init mechanism, but I trust your
> > judgement:
> > 
> > Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> Not that I know a lot myself, I just followed the advice at
> 
> https://www.freebsd.org/doc/en/articles/rc-scripting/article.html#rcng-confdummy
> 
> Maybe we should add this url ref to the commit itself?

I've edited the commit message here and fixed the error in the other
commit and pushed this series to staging.

Wei.
diff mbox

Patch

diff --git a/tools/hotplug/FreeBSD/rc.d/xencommons.in b/tools/hotplug/FreeBSD/rc.d/xencommons.in
index 81f69f3..2fcd84a 100644
--- a/tools/hotplug/FreeBSD/rc.d/xencommons.in
+++ b/tools/hotplug/FreeBSD/rc.d/xencommons.in
@@ -11,6 +11,7 @@  LD_LIBRARY_PATH="${libdir}"
 export LD_LIBRARY_PATH
 
 name="xencommons"
+rcvar="xencommons_enable"
 start_precmd="xen_precmd"
 start_cmd="xen_startcmd"
 stop_cmd="xen_stop"
@@ -23,6 +24,9 @@  XENCONSOLED_PIDFILE="@XEN_RUN_DIR@/xenconsoled.pid"
 #XENCONSOLED_TRACE="@XEN_LOG_DIR@/xenconsole-trace.log"
 #XENSTORED_TRACE="@XEN_LOG_DIR@/xen/xenstore-trace.log"
 
+load_rc_config $name
+: ${xencommons_enable:=no}
+
 xen_precmd()
 {
 	mkdir -p @XEN_LIB_STORED@ || exit 1
@@ -116,5 +120,4 @@  xen_status()
 	fi
 }
 
-load_rc_config $name
 run_rc_command "$1"
diff --git a/tools/hotplug/FreeBSD/rc.d/xendriverdomain.in b/tools/hotplug/FreeBSD/rc.d/xendriverdomain.in
index c71871c..1384fdd 100644
--- a/tools/hotplug/FreeBSD/rc.d/xendriverdomain.in
+++ b/tools/hotplug/FreeBSD/rc.d/xendriverdomain.in
@@ -13,12 +13,16 @@  LD_LIBRARY_PATH="${libdir}"
 export LD_LIBRARY_PATH
 
 name="xendriverdomain"
+rcvar="xendriverdomain_enable"
 start_cmd="xendriverdomain_startcmd"
 stop_cmd="xendriverdomain_stop"
 extra_commands=""
 
 XLDEVD_PIDFILE="@XEN_RUN_DIR@/xldevd.pid"
 
+load_rc_config $name
+: ${xendriverdomain_enable:=no}
+
 xendriverdomain_start()
 {
 	printf "Starting xenservices: xl devd."
@@ -38,5 +42,4 @@  xendriverdomain_stop()
 	wait_for_pids $rc_pids
 }
 
-load_rc_config $name
 run_rc_command "$1"