From 71e638cac5238444fc1ebc82081c3e5acc8502ab Mon Sep 17 00:00:00 2001 From: marko Date: Tue, 17 Mar 2009 14:35:19 +0000 Subject: [PATCH] Attempt at unbreaking ng_bridge and ng_hub node naming, in face of recent hashization (reads: randomization) of ngctl list output. Bug found by: Submitted by: Reviewed by: Approved by: Obtained from: --- hub.tcl | 6 +++--- lanswitch.tcl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hub.tcl b/hub.tcl index 747909e..8a133ae 100755 --- a/hub.tcl +++ b/hub.tcl @@ -26,7 +26,7 @@ # and Technology through the research contract #IP-2003-143. # -# $Id: hub.tcl,v 1.14 2008/01/05 18:06:25 marko Exp $ +# $Id: hub.tcl,v 1.15 2009/03/17 14:35:19 marko Exp $ #****h* imunes/hub.tcl @@ -76,8 +76,8 @@ proc $MODULE.instantiate { eid node } { upvar 0 ::cf::[set ::curcfg]::ngnodemap ngnodemap catch {exec vimage $eid ngctl mkpeer hub anchor anchor | tail -1} resp - catch {exec vimage $eid ngctl l | fgrep " Name: " | cut -c51-58 | xargs echo } nglist - set id [lindex $nglist 1] + catch {exec vimage $eid ngctl l | fgrep " Name: " | cut -c51-58 | xargs echo } nglist + set id [lindex $nglist 0] catch {exec vimage $eid ngctl name \[$id\]: $node} set ngnodemap($eid\.$node) $node } diff --git a/lanswitch.tcl b/lanswitch.tcl index 4264304..892a173 100755 --- a/lanswitch.tcl +++ b/lanswitch.tcl @@ -26,7 +26,7 @@ # and Technology through the research contract #IP-2003-143. # -# $Id: lanswitch.tcl,v 1.14 2008/01/05 18:06:25 marko Exp $ +# $Id: lanswitch.tcl,v 1.15 2009/03/17 14:35:19 marko Exp $ #****h* imunes/lanswitch.tcl @@ -76,8 +76,8 @@ proc $MODULE.instantiate { eid node } { upvar 0 ::cf::[set ::curcfg]::ngnodemap ngnodemap catch {exec vimage $eid ngctl mkpeer bridge anchor anchor | tail -1} resp - catch {exec vimage $eid ngctl l | fgrep " Name: " | cut -c51-58 | xargs echo } nglist - set id [lindex $nglist 1] + catch {exec vimage $eid ngctl l | fgrep " Name: " | cut -c51-58 | xargs echo } nglist + set id [lindex $nglist 0] catch {exec vimage $eid ngctl name \[$id\]: $node} set ngnodemap($eid\.$node) $node } -- 2.39.5