From: Mark Wooding Date: Sat, 3 Dec 2011 19:23:27 +0000 (+0000) Subject: bin/zoneconf: Fix preserving-config. X-Git-Tag: 1.0.0~5 X-Git-Url: https://git.distorted.org.uk/~mdw/zoneconf/commitdiff_plain/63ba7a29dc96a5ccb801408782c7d930c9009b4a bin/zoneconf: Fix preserving-config. It didn't actually preserve anything: wrong upvar level. --- diff --git a/bin/zoneconf b/bin/zoneconf index c8ac895..8e0646d 100755 --- a/bin/zoneconf +++ b/bin/zoneconf @@ -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