This is an automated email from the ASF dual-hosted git repository. dewrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git
commit f8ac3e237cc1a9efc2760f64abfab3be84d0c736 Author: Steve Malenfant <steve.malenf...@cox.com> AuthorDate: Thu Dec 21 08:03:56 2017 -0500 Moved ats_uid declaration locally where used --- traffic_ops/bin/traffic_ops_ort.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/traffic_ops/bin/traffic_ops_ort.pl b/traffic_ops/bin/traffic_ops_ort.pl index 193f85e..32d25ba 100755 --- a/traffic_ops/bin/traffic_ops_ort.pl +++ b/traffic_ops/bin/traffic_ops_ort.pl @@ -204,8 +204,6 @@ if ( $script_mode == $BADASS || $script_mode == $INTERACTIVE || $script_mode == my $header_comment = &get_header_comment($traffic_ops_host); -my $ats_uid; - if ( !defined $traffic_ops_host ) { print "FATAL Could not resolve Traffic Ops host!\n"; exit 1; @@ -1084,7 +1082,6 @@ sub sleep_timer { sub process_config_files { ( $log_level >> $INFO ) && print "\nINFO: ======== Start processing config files ========\n"; - $ats_uid = getpwnam("ats"); foreach my $file ( keys %{$cfg_file_tracker} ) { ( $log_level >> $DEBUG ) && print "DEBUG Starting processing of config file: $file\n"; my $return = undef; @@ -1500,6 +1497,7 @@ sub replace_cfg_file { my $cfg_file = shift; my $return_code = 0; my $select = 2; + if ( $script_mode == $INTERACTIVE ) { ( $log_level >> $ERROR ) && print @@ -1521,6 +1519,7 @@ sub replace_cfg_file { chown 0, 0, "$cfg_file_tracker->{$cfg_file}->{'location'}/$cfg_file"; } else { + my $ats_uid = getpwnam("ats"); chown $ats_uid, $ats_uid, "$cfg_file_tracker->{$cfg_file}->{'location'}/$cfg_file"; } $cfg_file_tracker->{$cfg_file}->{'change_applied'}++; @@ -2802,6 +2801,7 @@ sub backup_file { my $file = $filepath . "/" . $filename; if ( $script_mode != $REPORT ) { + my $ats_uid = getpwnam("ats"); my $bkp_dir; my $bkp_file; if ( -e $file ) { -- To stop receiving notification emails like this one, please contact dewr...@apache.org.