From a81b6e2728c81b84fb40d8cdaa258289050f8f74 Mon Sep 17 00:00:00 2001 From: cxhong Date: Thu, 22 Feb 2018 21:42:42 -0500 Subject: [PATCH] Get xCAT MASTER from dhcpclient lease file for configinterface postscripts (#4834) * Get MASTER from dhcp identifier for configinterface postscripts * modify MASTER line --- xCAT/postscripts/configinterface | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT/postscripts/configinterface b/xCAT/postscripts/configinterface index 4c99ec2aa..25e465d5e 100755 --- a/xCAT/postscripts/configinterface +++ b/xCAT/postscripts/configinterface @@ -9,6 +9,7 @@ fi xcat_intf="/etc/network/interfaces.d/xCAT.intf" +MASTER=$(cat /var/lib/dhcp/dhclient.eth0.leases|sed -n 's/.*cumulus-provision-url.*http:\/\+\([^\/]\+\)\/.*/\1/p'|tail -1) if [ -z "$MASTER" ]; then echo "xCAT Master unset! Cannot download interface description" exit 2