[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xl: add vif.default.script



commit 733b9c524dbc2bec318bfc3588ed1652455d30ec
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Wed Mar 13 17:42:17 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Fri Mar 15 12:40:47 2013 +0000

    xl: add vif.default.script
    
    Replace vifscript with vif.default.script. The old config option is
    kept for backwards compatibility.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Cc: George Dunlap <george.dunlap@xxxxxxxxxx>
    Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 docs/man/xl.conf.pod.5 |    4 +++-
 tools/libxl/xl.c       |   11 ++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/docs/man/xl.conf.pod.5 b/docs/man/xl.conf.pod.5
index 31aebca..7b9fcac 100644
--- a/docs/man/xl.conf.pod.5
+++ b/docs/man/xl.conf.pod.5
@@ -70,10 +70,12 @@ operations (primarily domain creation).
 
 Default: C</var/lock/xl>
 
-=item B<vifscript="PATH">
+=item B<vif.default.script="PATH">
 
 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>
 
 =item B<vif.default.bridge="NAME">
diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
index 9f45e45..4c598db 100644
--- a/tools/libxl/xl.c
+++ b/tools/libxl/xl.c
@@ -96,8 +96,17 @@ static void parse_global_config(const char *configfile,
      * different device kinds.
      */
 
-    if (!xlu_cfg_get_string (config, "vifscript", &buf, 0))
+    if (!xlu_cfg_get_string (config, "vifscript", &buf, 0)) {
+        fprintf(stderr, "the global config option vifscript is deprecated, "
+                        "please switch to vif.default.script\n");
+        free(default_vifscript);
         default_vifscript = strdup(buf);
+    }
+
+    if (!xlu_cfg_get_string (config, "vif.default.script", &buf, 0)) {
+        free(default_vifscript);
+        default_vifscript = strdup(buf);
+    }
 
     if (!xlu_cfg_get_string (config, "defaultbridge", &buf, 0)) {
         fprintf(stderr, "the global config option defaultbridge is deprecated, 
"
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.