bin/zoneconf: Fix preserving-config.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 3 Dec 2011 19:23:27 +0000 (19:23 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 3 Dec 2011 19:23:27 +0000 (19:23 +0000)
It didn't actually preserve anything: wrong upvar level.

bin/zoneconf

index c8ac895..8e0646d 100755 (executable)
@@ -312,7 +312,7 @@ proc preserving-config {confvar body} {
   ## Evaluate BODY, but on exit restore the CONFVAR array so that the BODY
   ## has no lasting effect on it.
 
-  upvar #1 $confvar CONFIG
+  upvar #0 $confvar CONFIG
   set old [array get CONFIG]
   unwind-protect {
     uplevel 1 $body