init/FreeBSD: Minor fixes for FreeBSD init scripts
PATCH 2/4 init/FreeBSD: remove xendriverdomain_precmd
In reply to Roger Pau Monne...because it's empty. While there also rename xendriverdomain_startcmd to xendriverdomain_start in order to match the nomenclature of the file.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
--- tools/hotplug/FreeBSD/rc.d/xendriverdomain.in | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +1 -7
@@ -13,19 +13,13 @@ LD_LIBRARY_PATH="${libdir}" export LD_LIBRARY_PATH name="xendriverdomain" -start_precmd="xendriverdomain_precmd" start_cmd="xendriverdomain_startcmd" stop_cmd="xendriverdomain_stop" extra_commands="" XLDEVD_PIDFILE="@XEN_RUN_DIR@/xldevd.pid" -xendriverdomain_precmd() -{ - : -} - -xendriverdomain_startcmd() +xendriverdomain_start() { printf "Starting xenservices: xl devd."
Signature · 7 lines
2.10.1 (Apple Git-78) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 4/4 init/FreeBSD: add rc control variables
In reply to Roger Pau MonneThose are used in order to decide which scripts are executed at init.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
--- tools/hotplug/FreeBSD/rc.d/xencommons.in | 5 ++++- tools/hotplug/FreeBSD/rc.d/xendriverdomain.in | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
tools/hotplug/FreeBSD/rc.d/xencommons.in +4 -1
@@ -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"
tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +4 -1
@@ -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"
Signature · 7 lines
2.10.1 (Apple Git-78) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
cover init/FreeBSD: Minor fixes for FreeBSD init scripts
A couple of minor fixes for FreeBSD init scripts that I've discovered while playing with FreeBSD driver domains.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH 1/4 init/FreeBSD: set correct PATH for xl devd
FreeBSD init scripts don't have /usr/local/{bin/sbin} in it's PATH, which prevents xl devd from working properly since hotplug scripts require the set of xenstore cli tools to be in PATH.
While there also fix the usage of --pidfile, which according to the xl help doesn't use "=", and add braces around XLDEVD_PIDFILE.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
--- tools/hotplug/FreeBSD/rc.d/xendriverdomain.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +1 -1
@@ -29,7 +29,7 @@ xendriverdomain_startcmd() { printf "Starting xenservices: xl devd." - ${sbindir}/xl devd --pidfile=$XLDEVD_PIDFILE ${XLDEVD_ARGS} + PATH="${bindir}:${sbindir}:$PATH" ${sbindir}/xl devd --pidfile ${XLDEVD_PIDFILE} ${XLDEVD_ARGS} printf "\n" }
Signature · 7 lines
2.10.1 (Apple Git-78) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 3/4 init/FreeBSD: fix xencommons so it can only be launched by Dom0
In reply to Roger Pau MonneAt the moment the execution of xencommons is gated on the presence of the privcmd device, but that's not correct, since privcmd is available to all Xen domains (privileged or unprivileged). Instead of using privcmd use the xenstored device, which will only be available to the domain that's in charge of running xenstored, and thus xencommons.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
--- tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hotplug/FreeBSD/rc.d/xencommons.in +1 -1
@@ -16,7 +16,7 @@ start_cmd="xen_startcmd" stop_cmd="xen_stop" status_cmd="xen_status" extra_commands="status" -required_files="/dev/xen/privcmd" +required_files="/dev/xen/xenstored" XENSTORED_PIDFILE="@XEN_RUN_DIR@/xenstored.pid" XENCONSOLED_PIDFILE="@XEN_RUN_DIR@/xenconsoled.pid"
Signature · 7 lines
2.10.1 (Apple Git-78) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH 1/4] init/FreeBSD: set correct PATH for xl devd
In reply to Roger Pau MonneQuoted 8 lines · Roger Pau Monne
FreeBSD init scripts don't have
/usr/local/{bin/sbin}in it's PATH, which preventsxl devdfrom working properly since hotplug scripts require the set of xenstore cli tools to be in PATH.While there also fix the usage of --pidfile, which according to the xl help doesn't use "=", and add braces around
XLDEVD_PIDFILE.Signed-off-by Roger Pau Monné <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/4] init/FreeBSD: remove xendriverdomain_precmd
In reply to Roger Pau MonneQuoted 16 lines · Roger Pau Monne
...because it's empty. While there also rename
xendriverdomain_startcmdtoxendriverdomain_startin order to match the nomenclature of the file.Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>--- tools/hotplug/FreeBSD/rc.d/xendriverdomain.in | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +0
-0
tools/hotplug/FreeBSD/rc.d/xendriverdomain.in LD_LIBRARY_PATH="${libdir}" · line 16
Quoted 5 lines
tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +0
-1@@ -13,19 +13,13 @@ LD_LIBRARY_PATH="${libdir}" export LD_LIBRARY_PATH name="xendriverdomain" -start_precmd="xendriverdomain_precmd" start_cmd="xendriverdomain_startcmd"
^^^^^^^^
You missed this.
otherwise:
Quoted 18 lines
tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +1
-6stop_cmd="xendriverdomain_stop" extra_commands="" XLDEVD_PIDFILE="@XEN_RUN_DIR@/xldevd.pid" -xendriverdomain_precmd() -{ - : -} - -xendriverdomain_startcmd() +xendriverdomain_start() { printf "Starting xenservices: xl devd."Signature · 1 line
2.10.1 (Apple Git-78)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 3/4] init/FreeBSD: fix xencommons so it can only be launched by Dom0
In reply to Roger Pau MonneQuoted 7 lines · Roger Pau Monne
At the moment the execution of xencommons is gated on the presence of the privcmd device, but that's not correct, since privcmd is available to all Xen domains (privileged or unprivileged). Instead of using privcmd use the xenstored device, which will only be available to the domain that's in charge of running xenstored, and thus xencommons.
Signed-off-by Roger Pau Monné <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 4/4] init/FreeBSD: add rc control variables
In reply to Roger Pau MonneQuoted 3 lines · Roger Pau Monne
Those are used in order to decide which scripts are executed at init.
Signed-off-by Roger Pau Monné <[email protected]>
Can't say I know much about FreeBSD init mechanism, but I trust your judgement:
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 4/4] init/FreeBSD: add rc control variables
Quoted 10 lines · Wei Liu
Quoted 3 lines · Roger Pau Monne
Those are used in order to decide which scripts are executed at init.
Signed-off-by Roger Pau Monné <[email protected]>Can't say I know much about FreeBSD init mechanism, but I trust your judgement:
Acked-by Wei Liu <[email protected]>
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.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/4] init/FreeBSD: remove xendriverdomain_precmd
In reply to Wei LiuQuoted 25 lines · Wei Liu
Quoted 16 lines · Roger Pau Monne
...because it's empty. While there also rename
xendriverdomain_startcmdtoxendriverdomain_startin order to match the nomenclature of the file.Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>--- tools/hotplug/FreeBSD/rc.d/xendriverdomain.in | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +0
-0tools/hotplug/FreeBSD/rc.d/xendriverdomain.in LD_LIBRARY_PATH="${libdir}" · line 16
Quoted 5 lines
tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +0
-1@@ -13,19 +13,13 @@ LD_LIBRARY_PATH="${libdir}" export LD_LIBRARY_PATH name="xendriverdomain" -start_precmd="xendriverdomain_precmd" start_cmd="xendriverdomain_startcmd"^^^^^^^^
You missed this.
Quoted 3 lines
otherwise:
Acked-by Wei Liu <[email protected]>
Would you like to fix this while committing, or should I push the updated series to a git branch?
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 4/4] init/FreeBSD: add rc control variables
In reply to Roger Pau MonneQuoted 10 lines · Roger Pau Monne
Quoted 9 lines · Wei Liu
Quoted 3 lines · Roger Pau Monne
Those are used in order to decide which scripts are executed at init.
Signed-off-by Roger Pau Monné <[email protected]>Can't say I know much about FreeBSD init mechanism, but I trust your judgement:
Quoted 7 lines
Quoted 1 line
Acked-by Wei Liu <[email protected]>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.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel