]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
tools/hotplug: Fix hostname setting in vif-nat
authorDiego Sueiro <diego.sueiro@arm.com>
Thu, 20 Aug 2020 10:58:20 +0000 (11:58 +0100)
committerWei Liu <wl@xen.org>
Wed, 9 Sep 2020 12:41:30 +0000 (12:41 +0000)
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@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Wei Liu <wl@xen.org>
tools/hotplug/Linux/vif-nat

index a76d9c784b5fea0fe585082a1960d9c128198c00..26144350b32deab65533ea1f56852b5018482285 100644 (file)
@@ -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"