From 69cfd26e6eb2daf5c75bea301a7d4bc158be68a1 Mon Sep 17 00:00:00 2001 From: ericm Date: Tue, 14 Jun 2005 19:08:08 +0000 Subject: [PATCH] need convert hostname to nid in local.sh --- lustre/tests/local.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lustre/tests/local.sh b/lustre/tests/local.sh index dd1b977..5f5df4e 100755 --- a/lustre/tests/local.sh +++ b/lustre/tests/local.sh @@ -34,9 +34,28 @@ STRIPES_PER_OBJ=0 # 0 means stripe over all OSTs rm -f $config +# +# duplicated form test-framework.sh +# +h2tcp() { + echo $1 +} +h2elan() { + echo $1 | sed 's/[^0-9]*//g' +} +h2openib() { + echo $1 | sed 's/[^0-9]*//g' +} + +local_nid() { + hostname=`hostname` + nid=`h2$NETTYPE $hostname` + echo $nid +} + # create nodes ${LMC} --add node --node localhost || exit 10 -${LMC} --add net --node localhost --nid `hostname` --nettype $NETTYPE || exit 11 +${LMC} --add net --node localhost --nid `local_nid` --nettype $NETTYPE || exit 11 ${LMC} --add net --node client --nid '*' --nettype $NETTYPE || exit 12 -- 1.8.3.1