Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68b1ec1
)
b=23234 use a regular expression to parse ip_addr from ret_str in lc_net
author
Elena Gryaznova
<grev@sun.com>
Mon, 30 Aug 2010 17:12:50 +0000
(21:12 +0400)
committer
Mikhail Pershin
<tappro@sun.com>
Tue, 31 Aug 2010 09:46:07 +0000
(13:46 +0400)
a=Chris Horn (CRAY)
i=Elena Gryaznova
i=Andrew Perepechko
lustre/scripts/lc_net.in
patch
|
blob
|
history
diff --git
a/lustre/scripts/lc_net.in
b/lustre/scripts/lc_net.in
index
16196d3
..
fef2637
100644
(file)
--- a/
lustre/scripts/lc_net.in
+++ b/
lustre/scripts/lc_net.in
@@
-169,11
+169,8
@@
remote_check() {
fi
# Get the IP address of ${HOST_NAMES[i]} from its own ping
- if is_pdsh; then
- ip_addr=`echo "${ret_str}" | head -1 | awk '{print $4}'`
- else
- ip_addr=`echo "${ret_str}" | head -1 | awk '{print $3}'`
- fi
+ ip_pattern="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
+ ip_addr=`echo "${ret_str}" | egrep -o "${ip_pattern}"`
ip_addr=`echo "${ip_addr}" | sed -e 's/^(//' -e 's/)$//'`
# Compare IP addresses