The script of determining the default interface is broken.
Remove complexity and replace with hostname
Test-Parameters: trivial
Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I0d662e9e24bed17078e31b6b5ca305cff2c0548e
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29776
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
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"