svn commit: r1327111 - in /incubator/vcl/trunk/managementnode/lib/VCL/Module/OS: Linux.pm Linux/Ubuntu.pm

2012-04-17 Thread fapeeler
Author: fapeeler
Date: Tue Apr 17 14:26:37 2012
New Revision: 1327111

URL: http://svn.apache.org/viewvc?rev=1327111view=rev
Log:
VCL-570

modified utils to better deal with systemd controled systems
more work on Ubuntu module


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

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=1327111r1=1327110r2=1327111view=diff
==
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Tue Apr 17 
14:26:37 2012
@@ -2051,46 +2051,77 @@ sub set_file_permissions {
 =cut
 
 sub generate_rc_local {
-my $self = shift;
+ my $self = shift;
 if (ref($self) !~ /linux/i) {
 notify($ERRORS{'CRITICAL'}, 0, subroutine was called as a 
function, it must be called as a class method);
 return 0;
 }

my $request_id   = $self-data-get_request_id();
-my $management_node_keys = $self-data-get_management_node_keys();
-my $computer_short_name  = $self-data-get_computer_short_name();
-my $computer_node_name   = $self-data-get_computer_node_name();
+   my $management_node_keys = $self-data-get_management_node_keys();
+   my $computer_short_name  = $self-data-get_computer_short_name();
+   my $computer_node_name   = $self-data-get_computer_node_name();

+   # Determine if /etc/rc.local is a symlink or not
+   my $command = file /etc/rc.local;
+   my $symlink = 0;
+   my $rc_local_path;
+   
+   my ($echo_exit_status, $echo_output) = $self-execute($command, 1);
+   if (!defined($echo_output)) {
+notify($ERRORS{'WARNING'}, 0, failed to run command to check file of 
/etc/rc.local);
+   }
+   elsif (grep(/symbolic/, @$echo_output)) {
+ notify($ERRORS{'OK'}, 0, confirmed /etc/rc.local is symbolic 
link \n . join(\n, @$echo_output));
+ $symlink = 1;
+   }
+   
+   if(!$symlink) {
+   #my $symlink_command = mv /etc/rc.local /etc/_orig.rc.local ; 
ln -s /etc/rc.d/rc.local /etc/rc.local;
+   #my ($sym_exit_status, $sym_output) = 
$self-execute($symlink_command, 1);
+  #if (!defined($sym_output)) {
+   #  notify($ERRORS{'WARNING'}, 0, failed to run symlink_command 
$symlink_command on node $computer_node_name);
+  #}
+   #else {
+   #notify($ERRORS{'OK'}, 0, successfully ran 
$symlink_command on $computer_node_name);
+   #}
+   
+   $rc_local_path = /etc/rc.local;
+   
+   }
+   else {
+   $rc_local_path = /etc/rc.d/rc.local;
+   }
+
my @array2print;
 
push(@array2print, '#!/bin/sh' . \n);
push(@array2print, '#' . \n);
-push(@array2print, '# This script will be executed after all the other 
init scripts.' . \n);
+   push(@array2print, '# This script will be executed after all the other init 
scripts.' . \n);
push(@array2print, '#' . \n);
-push(@array2print, '# WARNING --- VCL IMAGE CREATORS --- WARNING' . 
\n);
+   push(@array2print, '# WARNING --- VCL IMAGE CREATORS --- WARNING' . \n);
push(@array2print, '#' . \n);
-push(@array2print, '# This file will get overwritten during image 
capture. Any customizations' . \n);
-push(@array2print, '# should be put into /etc/init.d/vcl_post_reserve 
or /etc/init.d/vcl_post_load' . \n);
-push(@array2print, '# Note these files do not exist by default.' . 
\n);
-push(@array2print, \n);
-push(@array2print, #Use the /root/.vclcontrol/vcl_exclude_list to 
prevent vcld from updating this file.);
-push(@array2print, \n);
-push(@array2print, 'touch /var/lock/subsys/local' . \n);
-push(@array2print, \n);
-push(@array2print, 'IP0=$(ifconfig eth0 | grep inet | awk \'{print 
$2}\' | awk -F: \'{print $2}\')' . \n);
-push(@array2print, 'IP1=$(ifconfig eth1 | grep inet | awk \'{print 
$2}\' | awk -F: \'{print $2}\')' . \n);
-push(@array2print, 'sed -i -e \'/.*AllowUsers .*$/d\' 
/etc/ssh/sshd_config' . \n);
-push(@array2print, 'sed -i -e \'/.*ListenAddress .*/d\' 
/etc/ssh/sshd_config' . \n);
-push(@array2print, 'sed -i -e \'/.*ListenAddress .*/d\' 
/etc/ssh/external_sshd_config' . \n);
-push(@array2print, 'echo AllowUsers root  /etc/ssh/sshd_config' . 
\n);
-push(@array2print, 'echo ListenAddress $IP0  /etc/ssh/sshd_config' 
. \n);
-push(@array2print, 'echo ListenAddress $IP1  
/etc/ssh/external_sshd_config' . \n);
-push(@array2print, 'service 

svn commit: r1327224 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm

2012-04-17 Thread fapeeler
Author: fapeeler
Date: Tue Apr 17 19:01:45 2012
New Revision: 1327224

URL: http://svn.apache.org/viewvc?rev=1327224view=rev
Log:
VCL-570
typo

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

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm?rev=1327224r1=1327223r2=1327224view=diff
==
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm Tue 
Apr 17 19:01:45 2012
@@ -608,7 +608,7 @@ sub generate_rc_local {
 
 =cut
 
-sub generate_ext_sshd_start {
+sub generate_ext_sshd_sysVinit {
my $self = shift;
if (ref($self) !~ /ubuntu/i) {
   notify($ERRORS{'CRITICAL'}, 0, subroutine was called as a function, it 
must be called as a class method);
@@ -720,7 +720,7 @@ sub generate_ext_sshd_start {
foreach my $l (@ext_ssh_conf_init) {
$l =~ s/OpenSSH\ server/External\ OpenSSH\ server/g;
$l =~ s/\/var\/run\/sshd/\/var\/run\/ext_sshd/g;
-   $l =~ s/exec\ \/usr\/sbin\/sshd\ -D/exec\ \/usr\/sbin\/sshd\ 
-D\ -f\ \/etc\/ssh\/external_ssh.config/g;
+   $l =~ s/exec\ \/usr\/sbin\/sshd\ -D/exec\ \/usr\/sbin\/sshd\ 
-D\ -f\ \/etc\/ssh\/external_sshd_config/g;
}
 
#write_array to file




svn commit: r1327259 [6/7] - in /incubator/vcl/trunk/web: ./ .ht-inc/ js/ js/nls/ js/nls/ja_JP/ js/nls/zh_CN/ js/vcldojo/ js/vcldojo/nls/ js/vcldojo/nls/ja-jp/ js/vcldojo/nls/zh-cn/ locale/ locale/ja_

2012-04-17 Thread jfthomps
Added: incubator/vcl/trunk/web/locale/po_files/vcl.po.template
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/locale/po_files/vcl.po.template?rev=1327259view=auto
==
--- incubator/vcl/trunk/web/locale/po_files/vcl.po.template (added)
+++ incubator/vcl/trunk/web/locale/po_files/vcl.po.template Tue Apr 17 20:01:13 
2012
@@ -0,0 +1,2580 @@
+msgid 
+msgstr 
+Project-Id-Version: VCL 2.3\n
+Report-Msgid-Bugs-To: \n
+POT-Creation-Date: 2011-02-24 15:16+0900\n
+PO-Revision-Date: 2012-04-13 15:40-0500\n
+Last-Translator: \n
+Language-Team: \n
+MIME-Version: 1.0\n
+Content-Type: text/plain; charset=UTF-8\n
+Content-Transfer-Encoding: 8bit\n
+
+#: authentication.php:165
+#: utils.php:779
+msgid H2Welcome to the Virtual Computing Lab/H2\n
+msgstr 
+
+#: authentication.php:169
+msgid Please select an authentication method to use:brbr\n
+msgstr 
+
+#: authentication.php:171
+msgid font color=redSelected method failed, please try again/fontbr\n
+msgstr 
+
+#: authentication.php:183
+msgid label for=remselRemember my selection/labelbr\n
+msgstr 
+
+#: authentication.php:184
+msgid INPUT type=submit value=\Proceed to Login\ tabindex=3 name=userid\n
+msgstr 
+
+#: authentication.php:188
+msgid h3Explanation of authentication methods:/h3\n
+msgstr 
+
+#: authentication.php:248
+msgid Proceed to Login
+msgstr 
+
+#: authentication.php:257
+msgid  (unable to connect to authentication server)
+msgstr 
+
+#: authentication.php:295
+msgid Userid
+msgstr 
+
+#: authentication.php:296
+msgid Password
+msgstr 
+
+#: authentication.php:297
+msgid Login with 
+msgstr 
+
+#: authentication.php:303
+msgid font color=redLogin failed 
+msgstr 
+
+#: authentication.php:318
+msgid TD colspan=2 align=rightINPUT type=submit value=Login/TD\n
+msgstr 
+
+#: requests.php:57
+msgid H2New Reservation/H2br\n
+msgstr 
+
+#: requests.php:78
+msgid You don't have access to any environments and, therefore, cannot 
+msgstr 
+
+#: requests.php:79
+msgid make any reservations.br\n
+msgstr 
+
+#: requests.php:87
+msgid Please select the environment you want to use from the list:br\n
+msgstr 
+
+#: requests.php:149
+msgid strongImage Description/strong:br\n
+msgstr 
+
+#: requests.php:157
+msgid legendWhen would you like to use the application?/legend\n
+msgstr 
+
+#: requests.php:159
+msgid label for=\timenow\Now/labelbr\n
+msgstr 
+
+#: requests.php:161
+msgid label for=\laterradio\Later:/label\n
+msgstr 
+
+#: requests.php:195
+msgid INPUT id=newsubmit type=submit value=\Create Reservation\ 
+msgstr 
+
+#: requests.php:236
+msgid dojo.byId('imgdesc').innerHTML = 'strongImage 
Description/strong:br
+msgstr 
+
+#: requests.php:244
+#: requests.php:281
+msgid if(dojo.byId('newsubmit')) dojo.byId('newsubmit').value = 'Create 
Reservation';
+msgstr 
+
+#: requests.php:259
+msgid 'font color=redSelection not currently available due to scheduled 
system downtime for maintenance/font'; 
+msgstr 
+
+#: requests.php:263
+msgid 'font color=redSelection not currently available/font'; 
+msgstr 
+
+#: requests.php:268
+msgid 'Estimated load time: lt; 1 minute';
+msgstr 
+
+#: requests.php:273
+msgid 'Estimated load time: lt; 
+msgstr 
+
+#: requests.php:273
+msgid  minutes';
+msgstr 
+
+msgid minutes
+msgstr 
+
+#: requests.php:275
+#, php-format
+msgid 'Estimated load time: lt; %2.0f minutes';
+msgstr 
+
+#: requests.php:317
+#: requests.php:391
+#: requests.php:428
+#: requests.php:462
+#: requests.php:522
+#: requests.php:548
+msgid H2New Reservation/H2\n
+msgstr 
+
+#: requests.php:392
+msgid font color=\#ff\The time you requested is in the past.
+msgstr 
+
+#: requests.php:393
+msgid  Please select \Now\ or use a time in the future./fontbr\n
+msgstr 
+
+#: requests.php:430
+#: requests.php:439
+#: requests.php:1794
+#: requests.php:1800
+msgid font color=\#ff\The time you requested overlaps with 
+msgstr 
+
+#: requests.php:431
+#: requests.php:1795
+msgid another reservation you currently have.  You are only allowed 
+msgstr 
+
+#: requests.php:432
+#: requests.php:1796
+msgid to have a single reservation at any given time. Please select 
+msgstr 
+
+#: requests.php:433
+msgid another time to use the application. If you are finished with 
+msgstr 
+
+#: requests.php:434
+msgid an active reservation, click \Current Reservations\, 
+msgstr 
+
+#: requests.php:435
+msgid then click the \End\ button of your active reservation.
+msgstr 
+
+#: requests.php:440
+#: requests.php:1801
+msgid another reservation you currently have.  You are allowed 
+msgstr 
+
+#: requests.php:441
+#: requests.php:1802
+msgid to have 
+msgstr 
+
+#: requests.php:441
+#: requests.php:1802
+msgid  overlapping reservations at any given time. 
+msgstr 
+
+#: requests.php:442
+msgid Please select another time to use the application. If you are 
+msgstr 
+
+#: requests.php:443
+msgid finished with an active reservation, click \Current 
+msgstr 
+
+#: requests.php:444
+msgid Reservations\, then