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

[xen staging] tools/hotplug: Fix hostname setting in vif-nat



commit 5499e0fc8082024bf7e2d0facd5c976e82105070
Author:     Diego Sueiro <diego.sueiro@xxxxxxx>
AuthorDate: Thu Aug 20 11:58:20 2020 +0100
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Wed Sep 9 12:41:30 2020 +0000

    tools/hotplug: Fix hostname setting in vif-nat
    
    Setting the hostname is failing because the "$XENBUS_PATH/domain"
    doesn't exist anymore. To fix this we set it to dom$domid
    
    Signed-off-by: Diego Sueiro <diego.sueiro@xxxxxxx>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 tools/hotplug/Linux/vif-nat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hotplug/Linux/vif-nat b/tools/hotplug/Linux/vif-nat
index a76d9c784b..26144350b3 100644
--- a/tools/hotplug/Linux/vif-nat
+++ b/tools/hotplug/Linux/vif-nat
@@ -85,7 +85,7 @@ router_ip=$(routing_ip "$ip")
 # Split the given IP/bits pair.
 vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
 
-hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
+hostname=dom$domid
 if [ "$vifid" != "1" ]
 then
   hostname="$hostname-$vifid"
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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