/[smecontribs]/rpms/smeserver-hylafax/contribs10/smeserver-hylafax-0.9-Add-Update-event-to-createlinks.patch
ViewVC logotype

Contents of /rpms/smeserver-hylafax/contribs10/smeserver-hylafax-0.9-Add-Update-event-to-createlinks.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Oct 12 08:47:52 2021 UTC (3 years ago) by brianr
Branch: MAIN
CVS Tags: smeserver-hylafax-0_9-12_el7_sme, smeserver-hylafax-0_9-14_el7_sme, smeserver-hylafax-0_9-11_el7_sme, smeserver-hylafax-0_9-13_el7_sme, smeserver-hylafax-0_9-15_el7_sme, HEAD
* Mon Oct 11 2021 Brian Read <brianr@bjsystems.co.uk> 0.9-11.sme
- Add-Update-event-to-createlinks.patch [SME: 11269]

1 diff -urN smeserver-hylafax-0.9.old/createlinks smeserver-hylafax-0.9/createlinks
2 --- smeserver-hylafax-0.9.old/createlinks 2021-10-11 08:44:03.721092017 +0100
3 +++ smeserver-hylafax-0.9/createlinks 2021-10-11 13:19:55.151496770 +0100
4 @@ -1,10 +1,34 @@
5 #! /usr/bin/perl -w
6 -
7 use esmith::Build::CreateLinks qw(:all);
8 -my $event;
9 +# our event specific for updating with yum without reboot
10 +my $event = 'smeserver-hylafax-update';
11 +#add here the path to your templates needed to expand
12 +#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all your yum update event
13 +
14 +foreach my $file (qw(
15 + /etc/systemd/system-preset/49-koozali.preset
16 + /etc/hylafax/hyla.conf
17 + /usr/lib/systemd/system/hylafax.service
18 +))
19 +{
20 + templates2events( $file, $event );
21 +}
22 +#action needed in case we have a systemd unit
23 +event_link('systemd-default', $event, '10');
24 +event_link('systemd-reload', $event, '50');
25 +#action specific to this package
26 +#event_link('action', $event, '30');
27 +#services we need to restart
28 +safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/hylafax");
29 +#safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/hylafax-faxgetty"); - not needed apparently
30 +
31 +#and Server Manager panel link
32 +#panel_link('somefunction', 'manager');
33
34 -# Runlevel init links.
35 +
36 +# Runlevel init links - SME9
37 #service_link_enhanced("hylafax", "S95", "7");
38 #service_link_enhanced("hylafax", "K21", "6");
39 #service_link_enhanced("hylafax", "K21", "0");
40 #service_link_enhanced("hylafax", "K21", "1");
41 +
42 diff -urN smeserver-hylafax-0.9.old/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax smeserver-hylafax-0.9/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax
43 --- smeserver-hylafax-0.9.old/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax 2021-10-11 08:44:03.718091987 +0100
44 +++ smeserver-hylafax-0.9/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax 1970-01-01 01:00:00.000000000 +0100
45 @@ -1,14 +0,0 @@
46 -{
47 - my $status = $hylafax{status} || "enabled";
48 - my $port = $hylafax{port} || "ttyS0";
49 -
50 - if ($status eq 'enabled')
51 - {
52 - $OUT .= "start on runlevel [2345]\n";
53 - $OUT .= "stop on runlevel [S016]\n";
54 - $OUT .= " \n";
55 - $OUT .= "respawn\n";
56 - $OUT .= "instance /dev/$port\n";
57 - $OUT .= "exec /usr/sbin/faxgetty $port\n";
58 - }
59 -}
60 \ No newline at end of file
61 diff -urN smeserver-hylafax-0.9.old/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit smeserver-hylafax-0.9/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit
62 --- smeserver-hylafax-0.9.old/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit 1970-01-01 01:00:00.000000000 +0100
63 +++ smeserver-hylafax-0.9/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit 2021-10-11 13:18:54.500957479 +0100
64 @@ -0,0 +1,26 @@
65 +{
66 +my $port = $hylafax{port} || "ttyS0";
67 +
68 +$OUT .= "[Unit]\n";
69 +$OUT .= "Description=faxgetty on /dev/$port\n";
70 +$OUT .= "Documentation=man:faxgetty(8)\n";
71 +$OUT .= "BindsTo=dev-$port.device\n";
72 +$OUT .= "After=dev-$port.device systemd-user-sessions.service plymouth-quit-wait.service\n";
73 +$OUT .= "After=rc-local.service\n";
74 +$OUT .= "Before=sme-server.target\n";
75 +$OUT .= "IgnoreOnIsolate=yes\n";
76 +$OUT .= "\n";
77 +$OUT .= "[Service]\n";
78 +$OUT .= "ExecStart=-/usr/sbin/faxgetty /dev/$port\n";
79 +$OUT .= "Type=idle\n";
80 +$OUT .= "Restart=always\n";
81 +$OUT .= "RestartSec=0\n";
82 +$OUT .= "UtmpIdentifier=$port\n";
83 +$OUT .= "TTYPath=/dev/$port\n";
84 +$OUT .= "KillMode=process\n";
85 +$OUT .= "IgnoreSIGPIPE=no\n";
86 +$OUT .= "\n";
87 +$OUT .= "[Install]\n";
88 +$OUT .= "WantedBy=sme-server.target\n";
89 +$OUT .= "\n";
90 +}
91 diff -urN smeserver-hylafax-0.9.old/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf smeserver-hylafax-0.9/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf
92 --- smeserver-hylafax-0.9.old/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf 1970-01-01 01:00:00.000000000 +0100
93 +++ smeserver-hylafax-0.9/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf 2021-10-11 09:43:55.000000000 +0100
94 @@ -0,0 +1,5 @@
95 +[Service]
96 +# we do not allow mulitple instance on Koozali SME Server
97 +ExecStart=
98 +ExecStart=/bin/false
99 +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed