You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2017/01/27 16:53:57 UTC

[36/36] incubator-trafficcontrol git commit: ran perltidy

ran perltidy


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/2ab71fdd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/2ab71fdd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/2ab71fdd

Branch: refs/heads/master
Commit: 2ab71fdd0958f32401f860e0bab4765908b6ac09
Parents: 230aa7c
Author: peter.w.ryder <pe...@gmail.com>
Authored: Thu Jan 12 15:14:46 2017 -0500
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Jan 27 09:52:53 2017 -0700

----------------------------------------------------------------------
 traffic_ops/install/bin/postinstall       | 10 +++++-----
 traffic_ops/install/lib/InstallUtils.pm   |  2 +-
 traffic_ops/install/lib/ProfileCleanup.pm | 24 ++++++++++++------------
 3 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2ab71fdd/traffic_ops/install/bin/postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/postinstall b/traffic_ops/install/bin/postinstall
index 2f6f3d7..0f187b8 100755
--- a/traffic_ops/install/bin/postinstall
+++ b/traffic_ops/install/bin/postinstall
@@ -58,7 +58,7 @@ my $post_install_cfg = "/opt/traffic_ops/install/data/json/post_install.json";
 my $logFile = "/var/log/traffic_ops/postinstall.log";
 
 # debug mode
-my $debug   = 0;
+my $debug = 0;
 
 # log file for cpan output
 my $cpanLogFile = "/var/log/traffic_ops/cpan.log";
@@ -721,7 +721,7 @@ sub main {
     chdir("/opt/traffic_ops/install/bin");
 
     # if reconfigure is set then rebuild the perl deps
-    if ( $reconfigure ) {
+    if ($reconfigure) {
         my $rc = BuildPerlDeps::build( 1, $cpanLogFile );
         if ( $rc != 0 ) {
             errorOut("Failed to install perl dependencies, check the console output and rerun postinstall once you've resolved the error");
@@ -756,8 +756,8 @@ sub main {
     InstallUtils::writeJson( $post_install_cfg, $paramconf );
 
     # if reconfigure is set then setup the database
-    if ( $reconfigure ) {
-        if ( $automatic ) {
+    if ($reconfigure) {
+        if ($automatic) {
             setupDatabase( $todbconf, $opensslConfFile, $opensslconf->{genCert} );
         }
         else {
@@ -770,7 +770,7 @@ sub main {
 
     InstallUtils::logger( "Waiting for Traffic Ops to start", "info" );
 
-    if (-f $post_install_cfg) {
+    if ( -f $post_install_cfg ) {
         $parameters = InstallUtils::readJson($post_install_cfg);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2ab71fdd/traffic_ops/install/lib/InstallUtils.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/install/lib/InstallUtils.pm b/traffic_ops/install/lib/InstallUtils.pm
index 555ba84..7ba24d5 100644
--- a/traffic_ops/install/lib/InstallUtils.pm
+++ b/traffic_ops/install/lib/InstallUtils.pm
@@ -241,7 +241,7 @@ sub readJson {
 sub writeJson {
     my $file = shift;
     open( my $fh, '>', $file ) or die("open(): $!");
-    logger("Writing json to $file", "info");
+    logger( "Writing json to $file", "info" );
     foreach my $data (@_) {
         my $json_text = JSON->new->utf8->pretty->encode($data);
         print $fh $json_text, "\n";

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2ab71fdd/traffic_ops/install/lib/ProfileCleanup.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/install/lib/ProfileCleanup.pm b/traffic_ops/install/lib/ProfileCleanup.pm
index 4885a11..d9828cc 100644
--- a/traffic_ops/install/lib/ProfileCleanup.pm
+++ b/traffic_ops/install/lib/ProfileCleanup.pm
@@ -135,7 +135,7 @@ sub profile_import_single {
 }
 
 sub import_profiles {
-    my $toUri = shift;
+    my $toUri      = shift;
     my $adminconf  = shift;
     my $profileDir = shift;
 
@@ -226,25 +226,25 @@ sub profiles_exist {
 
 sub add_custom_profiles {
     my $custom_profile_dir = shift;
-    my $adminconf = shift;
-    my $toUri = shift;
+    my $adminconf          = shift;
+    my $toUri              = shift;
 
-    return if (! -e $custom_profile_dir );
+    return if ( !-e $custom_profile_dir );
 
-    opendir(DH, $custom_profile_dir) || return;
+    opendir( DH, $custom_profile_dir ) || return;
     my @profiles = readdir(DH);
     closedir(DH);
-    @profiles = grep(/^profile\..*\.traffic_ops$/, @profiles);
+    @profiles = grep( /^profile\..*\.traffic_ops$/, @profiles );
 
-    return if (scalar @profiles == 0);
+    return if ( scalar @profiles == 0 );
 
-    my $toUser = $adminconf->{tmAdminUser};
-    my $toPass = $adminconf->{tmAdminPw};
-    my $toCookie = get_traffic_ops_cookie($toUri, $toUser, $toPass);
+    my $toUser   = $adminconf->{tmAdminUser};
+    my $toPass   = $adminconf->{tmAdminPw};
+    my $toCookie = get_traffic_ops_cookie( $toUri, $toUser, $toPass );
 
     foreach my $profile (@profiles) {
-        print "\nimport profile ". $custom_profile_dir . $profile . "\n\n";
-        profile_import_single($custom_profile_dir . $profile, $toUri, $toCookie);
+        print "\nimport profile " . $custom_profile_dir . $profile . "\n\n";
+        profile_import_single( $custom_profile_dir . $profile, $toUri, $toCookie );
     }
 }