You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2014/03/25 16:57:08 UTC

svn commit: r1581388 - /vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Author: arkurth
Date: Tue Mar 25 15:57:08 2014
New Revision: 1581388

URL: http://svn.apache.org/r1581388
Log:
VCL-756
Moved code to run a custom vcl_post_load script to the end of Linux.pm::post_load.

Modified:
    vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=1581388&r1=1581387&r2=1581388&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Tue Mar 25 15:57:08 2014
@@ -373,22 +373,6 @@ sub post_load {
 		notify($ERRORS{'OK'}, 0, "cleared known identity keys");
 	}
 	
-	
-	# Run the vcl_post_load script if it exists in the image
-	my $script_path = '/etc/init.d/vcl_post_load';
-	if ($self->file_exists($script_path)) {
-		my $result = $self->run_script($script_path, '1', '300', '1');
-		if (!defined($result)) {
-			notify($ERRORS{'WARNING'}, 0, "error occurred running $script_path");
-		}
-		elsif ($result == 0) {
-			notify($ERRORS{'DEBUG'}, 0, "$script_path does not exist in image: $image_name");
-		}
-		else {
-			notify($ERRORS{'DEBUG'}, 0, "ran $script_path");
-		}
-	}
-	
 	if ($self->enable_firewall_port("tcp", "any", $mn_private_ip, 1)) {
 		notify($ERRORS{'OK'}, 0, "added MN_Priv_IP $mn_private_ip to firewall on $computer_short_name");
 	}
@@ -406,13 +390,23 @@ sub post_load {
 		notify($ERRORS{'OK'}, 0, "Updated hostname");
 	}
 	
+	# Run the vcl_post_load script if it exists in the image
+	my $script_path = '/etc/init.d/vcl_post_load';
+	if ($self->file_exists($script_path)) {
+		my $result = $self->run_script($script_path, '1', '300', '1');
+		if (!defined($result)) {
+			notify($ERRORS{'WARNING'}, 0, "error occurred running $script_path");
+		}
+		elsif ($result == 0) {
+			notify($ERRORS{'DEBUG'}, 0, "$script_path does not exist in image: $image_name");
+		}
+		else {
+			notify($ERRORS{'DEBUG'}, 0, "ran $script_path");
+		}
+	}
+	
 	# Add a line to currentimage.txt indicating post_load has run
 	$self->set_vcld_post_load_status();
-
-	#Update Hostname to match Public assigned name
-	if ($self->update_public_hostname()) {
-		notify($ERRORS{'OK'}, 0, "Updated hostname");
-	}
 	
 	return 1;