Index: openacs-4/packages/acs-core-docs/www/files/deploy =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/deploy,v diff -u -r1.1 -r1.1.20.1 --- openacs-4/packages/acs-core-docs/www/files/deploy 3 Mar 2004 13:21:22 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/files/deploy 13 Oct 2013 10:33:54 -0000 1.1.20.1 @@ -61,13 +61,13 @@ help {set help_p true} version {set help_p true} switch {set switch_p true} - demote {if {[string length $arg1] >0 } { + demote {if {$arg1 ne "" } { set demote $arg1 } { set help_p true } } - promote {if {[string length $arg1] >0 } { + promote {if {$arg1 ne "" } { set promote $arg1 } { set help_p true @@ -91,7 +91,7 @@ while {[regexp {(.[^\n]+)} $channel_fodder match_fodder row] } { # remove each row as it's handled set remove_count [string length $row] - set channel_fodder [string range $channel_fodder [expr $remove_count + 1] end] + set channel_fodder [string range $channel_fodder [expr {$remove_count + 1}] end] set channel [string range $row 9 10] set port [string range $row 33 37] set status [string range $row 12 14] @@ -131,7 +131,7 @@ close $fileId } - if { ![string equal $file_contents ""]} { + if { $file_contents ne "" } { set channel_match [lsearch -regexp $channel_data $file_contents ] if { $channel_match >= 1 } { set channel_info [lindex $channel_data $channel_match] @@ -183,7 +183,7 @@ standby dis } $type] - if { [string equal $balance_status $should_be] } { + if {$balance_status eq $should_be} { set status OK } else { set status "PROBLEM: is $balance_status, should be $should_be" @@ -220,7 +220,7 @@ global balance_bin set demote_server [lindex $server_list [lsearch -regexp $server_list $server]] - if { ![string equal [lindex $demote_server 4] live] } { + if { [lindex $demote_server 4] ne "live" } { puts "$server is not a live server - cannot demote" exit } @@ -253,7 +253,7 @@ global balance_bin set promote_server [lindex $server_list [lsearch -regexp $server_list $server]] - if { ![string equal [lindex $promote_server 4] standby] } { + if { [lindex $promote_server 4] ne "standby" } { puts "$server is not a standby server - cannot promote" exit } @@ -287,12 +287,12 @@ exit } -if { [string length $demote] >0 } { +if { $demote ne "" } { demote $demote exit } -if { [string length $promote] >0 } { +if { $promote ne "" } { promote $promote exit }