/[smecontribs]/rpms/smeserver-wireguard/contribs10/smeserver-wireguard-1.0-bz11721-init.patch
ViewVC logotype

Annotation of /rpms/smeserver-wireguard/contribs10/smeserver-wireguard-1.0-bz11721-init.patch

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


Revision 1.3 - (hide annotations) (download)
Thu Oct 28 01:34:43 2021 UTC (3 years ago) by jpp
Branch: MAIN
Changes since 1.2: +32 -0 lines
* Wed Oct 27 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-4.sme
- fix wrong ip [SME: 11721]
- updated templates fragments
- fix panel link ; fix private/public key creation; fix preset path

1 jpp 1.1 diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/db/configuration/migrate/wireguard smeserver-wireguard-1.0/root/etc/e-smith/db/configuration/migrate/wireguard
2     --- smeserver-wireguard-1.0.old/root/etc/e-smith/db/configuration/migrate/wireguard 2021-10-26 23:15:10.000000000 -0400
3     +++ smeserver-wireguard-1.0/root/etc/e-smith/db/configuration/migrate/wireguard 2021-10-27 17:28:48.614000000 -0400
4     @@ -18,7 +18,7 @@
5     my $minimum=16;
6     my $maximum=32;
7     my $x = $minimum + int(rand($maximum - $minimum));
8     -$DB->set_prop('wg-quick@wg0', 'ip', "172.$x.0.0") ;
9     +$DB->set_prop('wg-quick@wg0', 'ip', "172.$x.0.1") ;
10     }
11    
12     }
13 jpp 1.2 diff -Nur --no-dereference smeserver-wireguard-1.0.old/createlink smeserver-wireguard-1.0/createlink
14     --- smeserver-wireguard-1.0.old/createlink 2021-10-25 23:38:29.000000000 -0400
15     +++ smeserver-wireguard-1.0/createlink 2021-10-27 21:20:46.985000000 -0400
16     @@ -69,5 +69,5 @@
17     ));
18    
19    
20     -
21     +panel_link("wireguard", "manager");
22    
23     diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/db/configuration/migrate/wireguard smeserver-wireguard-1.0/root/etc/e-smith/db/configuration/migrate/wireguard
24     --- smeserver-wireguard-1.0.old/root/etc/e-smith/db/configuration/migrate/wireguard 2021-10-27 21:17:33.367000000 -0400
25     +++ smeserver-wireguard-1.0/root/etc/e-smith/db/configuration/migrate/wireguard 2021-10-27 21:18:24.898000000 -0400
26     @@ -6,7 +6,7 @@
27     $DB->set_prop('wg-quick@wg0', 'private', $value ) ;
28     }
29     # recreate public if empty or not the same
30     -$private=${'wg-quick@wg0'}{'private'};
31     +$private=$DB->get_prop('wg-quick@wg0', 'private') ;
32     $public=`/usr/bin/echo $private | /usr/bin/wg pubkey`;
33     chomp $public;
34     if ( ! defined ${'wg-quick@wg0'}{'public'} || ${'wg-quick@wg0'}{'public'} ne $public) {
35 jpp 1.3 diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard
36     --- smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard 1969-12-31 19:00:00.000000000 -0500
37     +++ smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard 2021-06-28 03:17:15.000000000 -0400
38     @@ -0,0 +1,12 @@
39     +# wireguard specific configuration
40     +{
41     +$wg = $wireguard{status} || 'disabled';
42     +$wg0 = ${'wg-quick@wg0'}{status} || 'disabled';
43     +if ($wg0 eq 'enabled') {
44     + $OUT .= "enable wg-quick\@wg0.service\n";
45     +} else {
46     + $OUT .= "disable wg-quick\@wg0.service\n";
47     +}
48     +
49     +}
50     +
51     diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard
52     --- smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard 2021-06-28 03:17:15.000000000 -0400
53     +++ smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard 1969-12-31 19:00:00.000000000 -0500
54     @@ -1,12 +0,0 @@
55     -# wireguard specific configuration
56     -{
57     -$wg = $wireguard{status} || 'disabled';
58     -$wg0 = ${'wg-quick@wg0'}{status} || 'disabled';
59     -if ($wg0 eq 'enabled') {
60     - $OUT .= "enable wg-quick\@wg0.service\n";
61     -} else {
62     - $OUT .= "disable wg-quick\@wg0.service\n";
63     -}
64     -
65     -}
66     -

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