Compare commits
	
		
			2 Commits
		
	
	
		
			11_0_0-62_
			...
			11_0_0-63_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4f00dfbdb1 | |||
| f9bf8cf064 | 
							
								
								
									
										9
									
								
								root/usr/lib/systemd/system/bootsequence.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								root/usr/lib/systemd/system/bootsequence.service
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| [Unit] | ||||
| Description=Koozali SME Server boot diagnostic tool | ||||
| After=sme-server.target | ||||
| PartOf=sme-server.target | ||||
|  | ||||
| [Service] | ||||
| Type=oneshot | ||||
| ExecStart=/bin/sh -c "/usr/bin/systemd-analyze plot > /usr/share/smanager/themes/default/public/images/boot.svg" | ||||
| RemainAfterExit=yes | ||||
| @@ -78,7 +78,7 @@ sub create_configuration_report { | ||||
|     # create the reporting template | ||||
|     my $configreport_template = Text::Template->new( | ||||
|         TYPE    => 'FILE', | ||||
|         SOURCE  => '/etc/e-smith/web/common/configuration_report.tmpl', | ||||
|         SOURCE  => '/usr/share/smanager/themes/default/public/configuration_report.tmpl', | ||||
|         UNTAINT => 1 | ||||
|     ); | ||||
|     my $report_creation_time = gen_locale_date_string; | ||||
| @@ -114,11 +114,23 @@ sub create_configuration_report { | ||||
|  | ||||
|     # prcess template | ||||
|     my $result = $configreport_template->fill_in(HASH => \%vars); | ||||
|      | ||||
|     #take out any multiple blank lines | ||||
|     #$result =~ s/\n{3,}/\n/g; | ||||
|      | ||||
|  | ||||
|     # write processed template to file | ||||
|     open(my $cfgrep, '>', $configreportfile) or die "Could not create temporary file for config report!"; | ||||
|     print $cfgrep $result; | ||||
|     close $cfgrep; | ||||
|      | ||||
|     #And create boot analysis image - now run externally by systemd, only run once per boot. | ||||
|     $result = `/usr/bin/systemctl start bootsequence.service`; | ||||
|     if (!$? == 0) { | ||||
| 		warn "/usr/bin/systemd-analyze plot Command failed \n"; | ||||
| 	} | ||||
|  | ||||
|      | ||||
| } ## end sub create_configuration_report | ||||
|  | ||||
| sub show_config_report { | ||||
|   | ||||
| @@ -0,0 +1,38 @@ | ||||
| Configuration report created {$report_creation_time} | ||||
|  | ||||
| ================== | ||||
| Base configuration | ||||
| ================== | ||||
| SME server version: 	  {$releaseversion} | ||||
| SME server mode:    	  {$systemmode} | ||||
| SME server previous mode: {$previoussystemmode } | ||||
| Running Kernel:     	  {$curkernel} | ||||
| =========================== | ||||
| New RPMs not in base system | ||||
| ===========================      | ||||
| { foreach $i (@newrpms) { | ||||
|             $OUT .= "$i"; | ||||
|           }     | ||||
| }  | ||||
| =========================== | ||||
| Custom and modified templates | ||||
| =========================== | ||||
| { foreach $i (@templates) { | ||||
|             $OUT .= "$i"; | ||||
|           } | ||||
| } | ||||
| =========================== | ||||
| Modified events | ||||
| =========================== | ||||
| { foreach $i (@events) { | ||||
|             $OUT .= "$i"; | ||||
|           } | ||||
| } | ||||
| ======================= | ||||
| Additional repositories | ||||
| ======================= | ||||
| { foreach $r (@repositories) { | ||||
|             $OUT .= "$r"; | ||||
|           } | ||||
| }   		 | ||||
| DONE! | ||||
| @@ -18,9 +18,16 @@ | ||||
|     <% my $btn = l('bugr_Download this report'); %> | ||||
|  | ||||
|     %= form_for 'bugreportD' => (method => 'POST') => begin | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	%= hidden_field 'trt' => $bugr_datas->{trt} | ||||
|     % end     | ||||
| 		%= submit_button "$btn", class => 'action' | ||||
| 		%= hidden_field 'trt' => $bugr_datas->{trt} | ||||
|     % end    | ||||
|      | ||||
|     % my $out = "================== <br />"; | ||||
|     % $out .= "Boot anaysis image (right click and save image to download)<br />"; | ||||
|     % $out .= "================== <br />"; | ||||
|     % $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >"; | ||||
|      | ||||
|    <br><%= $c->render_to_string(inline=>$out) %><br> | ||||
|  | ||||
| </div> | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,7 @@ Summary: Sme server  navigation module : manager 2 | ||||
| %define name smeserver-manager | ||||
| Name: %{name} | ||||
| %define version 11.0.0 | ||||
| %define release 62 | ||||
| %define release 63 | ||||
| Version: %{version} | ||||
| Release: %{release}%{?dist} | ||||
| License: GPL | ||||
| @@ -143,8 +143,13 @@ true | ||||
| %defattr(-,root,root) | ||||
|  | ||||
| %changelog | ||||
| * Thu Mar 06 2025 Brian Read <brianr@koozali.org> 11.0.0-63.sme | ||||
| - Add boot.svg image to Bug Report panel [SME: 12953] | ||||
| - Move report template to inside smanager tree | ||||
| - Add one-off systemd task to create boot.svg run from panel | ||||
|  | ||||
| * Tue Mar 04 2025 Brian Read <brianr@koozali.org> 11.0.0-62.sme | ||||
| - Update .lex files to conform to standard english punctuation  [SME: 11809] | ||||
| - Update *_en.lex files to conform to standard english punctuation  [SME: 11809] | ||||
|  | ||||
| * Tue Mar 04 2025 Brian Read <brianr@koozali.org> 11.0.0-61.sme | ||||
| - Arrange for the version in the footer to be suppressed if non admin login  [SME: 12887] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user