Skip to contentSkip to conversation

hotplug: 21549:8bcaec29574e breaks vif-script with arguments

PATCH In review Brendan Cully 2 participants 2 messages Aug 17, 2010 – Aug 18, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hotplug: 21549:8bcaec29574e breaks vif-script with arguments

# HG changeset patch
# User Brendan Cully <[email protected]>
# Date 1282083158 25200
# Node ID 74b9fe513d8591ca14233590062079b042abb68d # Parent 774dfc178c39bd3fe2ec14b4f96e60b78391b397
hotplug: 21549:8bcaec29574e breaks vif-script with arguments.

For example, (vif-script 'vif-bridge bridge=eth1') in xend-config.sxp will cause vif-setup to attempt to execute 'vif-bridge bridge=eth1' due to a quoting mismatch. The fix appears to be to remove the extra quotes around "$script" in vif-setup.

tools/hotplug/Linux/vif-setup +1 -1
@@ -2,7 +2,7 @@
 
 if test "$script"
 then
-    exec "$script" $*
+    exec $script $*
 else
     exec /etc/xen/scripts/vif-bridge $*
 fi
#1 lore raw

Brendan Cully writes ("[Xen-devel] [PATCH] hotplug: 21549:8bcaec29574e breaks vif-script with arguments"):

Quoted 6 lines

hotplug: 21549:8bcaec29574e breaks vif-script with arguments.

For example, (vif-script 'vif-bridge bridge=eth1') in xend-config.sxp will cause vif-setup to attempt to execute 'vif-bridge bridge=eth1' due to a quoting mismatch. The fix appears to be to remove the extra quotes around "$script" in vif-setup.

The question is whether the argument is supposed to be a sh syntax command or the name of an executable which latter might contain spaces.

I think your intererpretation (the former) is better, and it's what we had before, so I have applied your patch.

Ian.