From: marko Date: Wed, 20 Jul 2005 22:51:55 +0000 (+0000) Subject: Minor fix in config parser - previously we silently discarded all lines X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=f54c319dd5b586e3b08c14594c212e03fe34ec34;p=imunes.git Minor fix in config parser - previously we silently discarded all lines in network- and custom- config sections not beginning with a character, now it is allowed for entries in those sections to start right at column 0. Remove another Tk polluting line from exec.tcl Bug found by: Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- diff --git a/cfgparse.tcl b/cfgparse.tcl index 5b06b51..3aed419 100755 --- a/cfgparse.tcl +++ b/cfgparse.tcl @@ -188,9 +188,10 @@ proc loadCfg { cfg } { foreach zline [split $value { }] { if { [string index "$zline" 0] == " " } { set zline [string replace "$zline" 0 0] - lappend cfg $zline } + lappend cfg $zline } + set cfg [lrange $cfg 1 [expr [llength $cfg] - 2]] lappend $object "network-config {$cfg}" } custom-enabled { @@ -204,9 +205,10 @@ proc loadCfg { cfg } { foreach zline [split $value { }] { if { [string index "$zline" 0] == " " } { set zline [string replace "$zline" 0 0] - lappend cfg $zline } + lappend cfg $zline } + set cfg [lrange $cfg 1 [expr [llength $cfg] - 2]] lappend $object "custom-config {$cfg}" } iconcoords { diff --git a/exec.tcl b/exec.tcl index eb5909a..dff4ddf 100755 --- a/exec.tcl +++ b/exec.tcl @@ -332,7 +332,6 @@ proc vimageCleanup {} { catch { nexec rm -f /usr/local/xorp/config.boot } catch { nexec mv /etc/resolv.conf.bak /etc/resolv.conf } statline "Cleanup completed in [expr [clock seconds] - $t_start] seconds." - .c config -cursor left_ptr }