Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts
PATCH 1/1 Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts
Now that scripts are stored in libexec, replace all hardcoded paths to use XEN_SCRIPT_DIR to expand the actual location.
Update .gitignore.
---
.gitignore | 3 +++
docs/configure.ac | 3 +++
.../{xl-disk-configuration.5.pod => xl-disk-configuration.5.pod.in} | 2 +-
...etwork-configuration.5.pod => xl-network-configuration.5.pod.in} | 4 ++--
docs/man/xl.1.pod.in | 2 +-
docs/man/{xl.conf.5.pod => xl.conf.5.pod.in} | 6 +++---
docs/misc/block-scripts.txt | 2 +-
tools/xl/xl_cmdtable.c | 2 +-
8 files changed, 15 insertions(+), 9 deletions(-)
rename docs/man/{xl-disk-configuration.5.pod => xl-disk-configuration.5.pod.in} (99%)
rename docs/man/{xl-network-configuration.5.pod => xl-network-configuration.5.pod.in} (98%)
rename docs/man/{xl.conf.5.pod => xl.conf.5.pod.in} (97%).gitignore +3 -0
@@ -47,7 +47,10 @@ dist/* docs/tmp.* docs/html/ docs/man/xl.cfg.5.pod +docs/man/xl-disk-configuration.5.pod +docs/man/xl-network-configuration.5.pod docs/man/xl.1.pod +docs/man/xl.conf.5.pod docs/man1/ docs/man5/ docs/man7/
docs/configure.ac +3 -0
@@ -9,6 +9,9 @@ AC_CONFIG_FILES([ ../config/Docs.mk man/xl.cfg.5.pod man/xl.1.pod +man/xl-disk-configuration.5.pod +man/xl-network-configuration.5.pod +man/xl.conf.5.pod ]) AC_CONFIG_AUX_DIR([../])
docs/man/xl-disk-configuration.5.pod.in renamed from docs/man/xl-disk-configuration.5.pod +1 -1
@@ -257,7 +257,7 @@ automatically determine the most suitable backend. Specifies that B<target> is not a normal host path, but rather information to be interpreted by the executable program I<SCRIPT>, -(looked for in F</etc/xen/scripts>, if it doesn't contain a slash). +(looked for in F<@XEN_SCRIPT_DIR@>, if it doesn't contain a slash). These scripts are normally called "block-I<SCRIPT>".
docs/man/xl-network-configuration.5.pod.in renamed from docs/man/xl-network-configuration.5.pod +2 -2
@@ -169,8 +169,8 @@ number. Likewise the default tap name is C<vifDOMID.DEVID-emu>. Specifies the hotplug script to run to configure this device (e.g. to add it to the relevant bridge). Defaults to -C<XEN_SCRIPT_DIR/vif-bridge> but can be set to any script. Some example -scripts are installed in C<XEN_SCRIPT_DIR>. +C<@XEN_SCRIPT_DIR@/vif-bridge> but can be set to any script. Some example +scripts are installed in C<@XEN_SCRIPT_DIR@>. =head2 ip
docs/man/xl.1.pod.in +1 -1
@@ -571,7 +571,7 @@ See the corresponding option of the I<create> subcommand. =item B<-N> I<netbufscript> Use <netbufscript> to setup network buffering instead of the -default script (/etc/xen/scripts/remus-netbuf-setup). +default script (@XEN_SCRIPT_DIR@/remus-netbuf-setup). =item B<-F>
docs/man/xl.conf.5.pod.in renamed from docs/man/xl.conf.5.pod +3 -3
@@ -95,7 +95,7 @@ Configures the default hotplug script used by virtual network devices. The old B<vifscript> option is deprecated and should not be used. -Default: C</etc/xen/scripts/vif-bridge> +Default: C<@XEN_SCRIPT_DIR@/vif-bridge> =item B<vif.default.bridge="NAME">
@@ -121,13 +121,13 @@ Default: C<None> Configures the default script used by Remus to setup network buffering. -Default: C</etc/xen/scripts/remus-netbuf-setup> +Default: C<@XEN_SCRIPT_DIR@/remus-netbuf-setup> =item B<colo.default.proxyscript="PATH"> Configures the default script used by COLO to setup colo-proxy. -Default: C</etc/xen/scripts/colo-proxy-setup> +Default: C<@XEN_SCRIPT_DIR@/colo-proxy-setup> =item B<output_format="json|sxp">
docs/misc/block-scripts.txt +1 -1
@@ -18,7 +18,7 @@ Setup It is highly recommended that custom hotplug scripts as much as possible include and use the common Xen functionality. If the script -is run from the normal block script location (/etc/xen/scripts by +is run from the normal block script location (/usr/lib/xen/scripts by default), then this can be done by adding the following to the top of the script:
tools/xl/xl_cmdtable.c +1 -1
@@ -518,7 +518,7 @@ struct cmd_spec cmd_table[] = {"-e Do not wait in the background (on <host>) for the death\n" " of the domain.\n" "-N <netbufscript> Use netbufscript to setup network buffering instead of the\n" -" default script (/etc/xen/scripts/remus-netbuf-setup).\n" +" default script (" XEN_SCRIPT_DIR "/remus-netbuf-setup).\n" "-F Enable unsafe configurations [-b|-n|-d flags]. Use this option\n" " with caution as failover may not work as intended.\n" "-b Replicate memory checkpoints to /dev/null (blackhole).\n"
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi,
Quoted 2 lines · Olaf Hering
Now that scripts are stored in libexec, replace all hardcoded paths to use
XEN_SCRIPT_DIRto expand the actual location.
As far as I can tell, this isn't true, scripts are located in /etc.
If you want to move the scripts from /etc to libexec, it might be worth doing so in a separated patch. And keep this patch to only move hard codded strings "/etc/xen/scripts" to use XEN_SCRIPT_DIR instead.
Since this patch doesn't actually move anything, there might be a different patch. The patch comment doesn't needs to discuss about it at all. So removing the comment about location of scripts and the extra hunk and this patch would be fine by me.
Quoted 9 lines
Update .gitignore.
Signed-off-by Olaf Hering <[email protected]>---
docs/misc/block-scripts.txt +0
-0
docs/misc/block-scripts.txt Setup · line 21
Quoted 5 lines
docs/misc/block-scripts.txt +1
-1@@ -18,7 +18,7 @@ Setup It is highly recommended that custom hotplug scripts as much as possible include and use the common Xen functionality. If the script -is run from the normal block script location (/etc/xen/scripts by +is run from the normal block script location (/usr/lib/xen/scripts by
I don't think this hunk belong to this patch, it would be better to have that in a different patch, I think.
docs/misc/block-scripts.txt Setup · line 24
Quoted 3 lines
docs/misc/block-scripts.txt +0
-0default), then this can be done by adding the following to the top of the script:
Thanks,
Signature · 6 lines
Anthony PERARD _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Am Tue, 2 Jul 2019 15:52:37 +0100
schrieb Anthony PERARD <[email protected]>:
Quoted 1 line
As far as I can tell, this isn't true, scripts are located in /etc.
There was zero response to the other patches.
This one just depends on them.
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel