~mdw
/
zoneconf
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2042733
)
bin/zoneconf: Fix preserving-config.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 3 Dec 2011 19:23:27 +0000
(19:23 +0000)
committer
Mark 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
patch
|
blob
|
blame
|
history
diff --git
a/bin/zoneconf
b/bin/zoneconf
index
c8ac895
..
8e0646d
100755
(executable)
--- 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