From bac71754b9dbb83b3ccf10ae99c027cc6b2f9829 Mon Sep 17 00:00:00 2001 From: Li Xi Date: Wed, 25 Oct 2017 13:53:37 -0400 Subject: [PATCH] LU-10161 lbuild: fix the problem of determine default_iface The script of determining the default interface is broken. Remove complexity and replace with hostname Test-Parameters: trivial Signed-off-by: Li Xi Change-Id: I0d662e9e24bed17078e31b6b5ca305cff2c0548e Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/29776 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Gu Zheng --- contrib/lbuild/lbuild | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 86b08c7..e05dcb9 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -1342,13 +1342,9 @@ store_for_reuse() { linkflag="l" fi - local default_iface=$(/sbin/ip route get 192.1.1.1 | sed -ne 's/.* dev \(.*\) * src .*/\1/p') - if [ -z "$default_iface" ]; then - fatal 1 "Failed to determine the default route interface" - fi - local unique_id=$(/sbin/ip addr show dev $default_iface | sed -ne '/ inet /s/ *inet \(.*\)\/.*/\1/p' | head -1) + local unique_id=$(hostname -s) if [ -z "$unique_id" ]; then - fatal 1 "Failed to determine a unique id from interface $default_interface" + fatal 1 "Failed to determine hostname." fi local finallocation="$location"/"$signature"/"$module" -- 1.8.3.1