1 |
trevorb |
1.1 |
diff -urN smeserver-thinclient-2.2.old/createlinks smeserver-thinclient-2.2/createlinks |
2 |
|
|
--- smeserver-thinclient-2.2.old/createlinks 2022-06-30 09:38:20.915773538 +1000 |
3 |
|
|
+++ smeserver-thinclient-2.2/createlinks 2022-06-30 11:01:31.133590901 +1000 |
4 |
|
|
@@ -2,7 +2,25 @@ |
5 |
|
|
|
6 |
|
|
use esmith::Build::CreateLinks qw(:all); |
7 |
|
|
use File::Basename; |
8 |
|
|
+use File::Path; |
9 |
|
|
|
10 |
|
|
-my $panel = "manager"; |
11 |
|
|
+# our event specific for updating with yum without reboot |
12 |
|
|
+$event = 'smeserver-thinclient-update'; |
13 |
|
|
+#add here the path to your templates needed to expand |
14 |
|
|
+#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event |
15 |
|
|
|
16 |
|
|
-panel_link("thinclient", $panel); |
17 |
|
|
\ No newline at end of file |
18 |
|
|
+foreach my $file (qw( |
19 |
|
|
+ /etc/dhcpd.thinclient |
20 |
|
|
+)) |
21 |
|
|
+{ |
22 |
|
|
+ templates2events( $file, $event ); |
23 |
|
|
+} |
24 |
|
|
+#action needed in case we have a systemd unit |
25 |
|
|
+# event_link('systemd-default', $event, '10'); |
26 |
|
|
+# event_link('systemd-reload', $event, '50'); |
27 |
|
|
+#action specific to this package |
28 |
|
|
+#event_link('action', $event, '30'); |
29 |
|
|
+#services we need to restart |
30 |
|
|
+safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/dhcpd"); |
31 |
|
|
+#and Server Manager panel link |
32 |
|
|
+panel_link("thinclient", "manager") |
33 |
|
|
diff -urN smeserver-thinclient-2.2.old/root/etc/e-smith/web/functions/thinclient smeserver-thinclient-2.2/root/etc/e-smith/web/functions/thinclient |
34 |
|
|
--- smeserver-thinclient-2.2.old/root/etc/e-smith/web/functions/thinclient 2022-06-30 09:38:20.911773606 +1000 |
35 |
|
|
+++ smeserver-thinclient-2.2/root/etc/e-smith/web/functions/thinclient 2022-06-30 09:39:38.531440918 +1000 |
36 |
|
|
@@ -1301,13 +1301,10 @@ |
37 |
|
|
} |
38 |
|
|
} |
39 |
|
|
|
40 |
|
|
- if ($action eq "Delete" || $macrec->prop('status') eq 'enabled') |
41 |
|
|
+ if (system ("/sbin/e-smith/signal-event smeserver-thinclient-update > /var/log/thinclient.log 2>&1")) |
42 |
|
|
{ |
43 |
|
|
- if (system ("/sbin/e-smith/signal-event smeserver-thinclient-update > /var/log/thinclient.log 2>&1")) |
44 |
|
|
- { |
45 |
|
|
- showWorkstationPanel($q, "Error occurred during thinclient-update event.", "/var/log/thinclient.log"); |
46 |
|
|
- return; |
47 |
|
|
- } |
48 |
|
|
+ showWorkstationPanel($q, "Error occurred during thinclient-update event.", "/var/log/thinclient.log"); |
49 |
|
|
+ return; |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
showInitial ($q, "success", "$action of Workstation [$mac], successfull", ""); |