Commit graph

799 commits

Author SHA1 Message Date
Christian Hesse
e991c82016 add script 'packages-update' 2019-02-19 16:47:41 +01:00
Christian Hesse
c92ff8f9a6 check-routeros-update: run installation without-paging 2019-02-19 16:27:21 +01:00
Christian Hesse
74683b3fc8 capsman-download-packages: split off capsman-rolling-upgrade 2019-02-14 20:49:05 +01:00
Christian Hesse
f127e3b7ef global-functions: detect failed package downloads 2019-02-14 20:35:13 +01:00
Christian Hesse
151435ba0c capsman-download-packages: use $CleanFilePath 2019-02-13 09:44:45 +01:00
Christian Hesse
c361caee5b global-functions: introduce and use $CleanFilePath 2019-02-13 09:44:15 +01:00
Christian Hesse
8537bbe19d global-functions: remove file on failed download 2019-02-13 09:22:20 +01:00
Christian Hesse
e9b4094dba gps-track: replace http-content-type with http-header-field
This changed in 6.44beta75.
2019-02-11 22:00:03 +01:00
Christian Hesse
5365c6163c unattended-lte-firmware-upgrade: remove workaround
This is fixed in 6.44beta75.
2019-02-11 22:00:03 +01:00
Christian Hesse
f60d99a254 check-lte-firmware-upgrade: remove workaround
This is fixed in 6.44beta75.
2019-02-11 16:21:28 +01:00
Christian Hesse
770397d029 unattended-lte-firmware-upgrade: add missing colon 2019-02-11 15:15:21 +01:00
Christian Hesse
900820b519 global-functions: add missing colon 2019-02-11 15:14:23 +01:00
Christian Hesse
db2c4fbf39 global-functions: prevent infinite loop in $CharacterReplace 2019-02-08 20:15:49 +01:00
Christian Hesse
6a48c8b5e7 ipv6-update: simplify array access 2019-02-08 14:14:15 +01:00
Christian Hesse
7fc12f9e24 dhcp-to-dns: rework, fix cleanup with mac-address and more 2019-02-08 13:43:00 +01:00
Christian Hesse
a47aa45253 dhcp-to-dns: use mac-address if hostname is empty 2019-02-08 13:03:42 +01:00
Christian Hesse
0a34f4c2c2 dhcp-to-dns: use $CharacterReplace 2019-02-08 13:02:39 +01:00
Christian Hesse
fc2547c137 global-functions: add $CharacterReplace 2019-02-08 12:54:54 +01:00
Christian Hesse
4c61849483 capsman-download-packages: upgrade CAPs one after another with delay 2019-02-07 11:04:15 +01:00
Christian Hesse
b3459ed47c gps-track: strip trailing binary zeros 2019-01-29 09:32:18 +01:00
Christian Hesse
9c71b191c1 gps-track: log about coordinate-format 2019-01-29 09:30:57 +01:00
Christian Hesse
eda4d10c0a check-routeros-update: run email-backup on auto-update 2019-01-18 11:08:11 +01:00
Christian Hesse
29d47361b7 email-backup: silence unwanted output 2019-01-15 10:58:54 +01:00
Christian Hesse
3ab5726fa5 update-tunnelbroker: fix parsing id 2019-01-15 10:46:54 +01:00
Christian Hesse
494fdfd920 update-tunnelbroker: simplify array access 2019-01-15 10:46:35 +01:00
Christian Hesse
de0a3a7d88 netwatch-syslog: simplify array access 2019-01-15 10:40:40 +01:00
Christian Hesse
1ca1b48bcd collect-wireless-mac: simplify array access 2019-01-15 10:38:47 +01:00
Christian Hesse
cedc178595 dhcp-lease-comment: simplify array access 2019-01-15 10:34:22 +01:00
Christian Hesse
07973066c9 lease-script: split scripts for de/assign, add debug log 2019-01-15 10:29:12 +01:00
Christian Hesse
eb14820f2e email-backup: give board name and model 2019-01-14 11:29:36 +01:00
Christian Hesse
5664449f64 initial-commands: put into blocks 2019-01-12 15:48:48 +01:00
Christian Hesse
afeab858d4 check-certificates: strip prefix from issuer CN 2019-01-12 00:47:53 +01:00
Christian Hesse
e62fbd2489 check-certificates: properly handle expired certificates 2019-01-12 00:04:53 +01:00
Christian Hesse
4ab9f9e7c8 check-certificates: move conditions to loop 2019-01-09 22:26:32 +01:00
Christian Hesse
df7cb1b88b check-certificates: shorten key for detailed infos 2019-01-09 17:38:55 +01:00
Christian Hesse
e51daf2761 check-certificates: show issuer CN only 2019-01-09 17:34:08 +01:00
Christian Hesse
57d93aa701 email-backup: be more verbose about attached files and secret key 2019-01-09 15:06:01 +01:00
Christian Hesse
fe34a80a3d check-certificates: include the issuer in notifications 2019-01-09 14:33:09 +01:00
Christian Hesse
1b9a277b47 check-certificates: update CommonName after renewal 2019-01-09 14:29:15 +01:00
Christian Hesse
40931f4f28 super-mario-theme: simplify array access 2019-01-09 12:54:59 +01:00
Christian Hesse
bd92237003 daily-psk: simplify algorithm 2019-01-09 12:52:30 +01:00
Christian Hesse
1ee2491e66 check-certificates: use time functionality
No need to calculate that...
2019-01-09 11:43:30 +01:00
Christian Hesse
5539233417 check-certificates: send notification on renewal 2019-01-09 10:38:41 +01:00
Christian Hesse
6b6c3d5119 check-certificates: drop extra warning
A sent notification implies that renewal failed.
2019-01-09 10:31:54 +01:00
Christian Hesse
0abb9a1848 ppp-on-up: just release ipv6 lease
This should get a new lease immediately.
2019-01-04 20:32:14 +01:00
Christian Hesse
63406dafbe ppp-on-up: run scripts if available 2019-01-04 20:29:42 +01:00
Christian Hesse
1cd7679a07 update-tunnelbroker: get tunnelbroker config from interface comment 2019-01-04 20:20:20 +01:00
Christian Hesse
698bed2bbc email-backup: print to update from cloud 2019-01-04 14:14:37 +01:00
Christian Hesse
c3f27bf776 ppp-on-up: fix variable handling
The variable $interface is not a name but a reference... Basically
this worked only because of the oddity - the filter did not work
and *all* dhcp-clients were disabled and enabled.
2019-01-04 13:02:34 +01:00
Christian Hesse
870f00bb36 global: variable names are CamelCase
___  _         ___     __
           / _ )(_)__ _   / _/__ _/ /_
          / _  / / _ `/  / _/ _ `/ __/
         /____/_/\_, /  /_/ \_,_/\__/
 _       __     /___/       _             __
| |     / /___ __________  (_)___  ____ _/ /
| | /| / / __ `/ ___/ __ \/ / __ \/ __ `/ /
| |/ |/ / /_/ / /  / / / / / / / / /_/ /_/
|__/|__/\__,_/_/  /_/ /_/_/_/ /_/\__, (_)
                                /____/

RouterOS has some odd behavior when it comes to variable names. Let's
have a look at the interfaces:

[admin@MikroTik] > / interface print where name=en1
Flags: D - dynamic, X - disabled, R - running, S - slave
 #     NAME                                TYPE       ACTUAL-MTU L2MTU
 0  RS en1                                 ether            1500  1598

That looks ok. Now we use a script:

{ :local interface "en1";
  / interface print where name=$interface; }

And the result...

[admin@MikroTik] > { :local interface "en1";
{...   / interface print where name=$interface; }
Flags: D - dynamic, X - disabled, R - running, S - slave
 #     NAME                                TYPE       ACTUAL-MTU L2MTU
 0  RS en1                                 ether            1500  1598

... still looks ok.
We make a little modification to the script:

{ :local name "en1";
  / interface print where name=$name; }

And the result:

[admin@MikroTik] > { :local name "en1";
{...   / interface print where name=$name; }
Flags: D - dynamic, X - disabled, R - running, S - slave
 #     NAME                                TYPE       ACTUAL-MTU L2MTU
 0  RS en1                                 ether            1500  1598
 1   S en2                                 ether            1500  1598
 2   S en3                                 ether            1500  1598
 3   S en4                                 ether            1500  1598
 4   S en5                                 ether            1500  1598
 5  R  br-local                            bridge           1500  1598

Ups! The filter has no effect!
That happens whenever the variable name ($name) matches the property
name (name=).

And another modification:

{ :local type "en1";
  / interface print where name=$type; }

And the result:

[admin@MikroTik] > { :local type "en1";
{...   / interface print where name=$type; }
Flags: D - dynamic, X - disabled, R - running, S - slave
 #     NAME                                TYPE       ACTUAL-MTU L2MTU

Ups! Nothing?
Even if the variable name ($type) matches whatever property name (type=)
things go wrong.

The answer from MikroTik support (in Ticket#2019010222000454):

> This is how scripting works in RouterOS and we will not fix it.

To get around this we use variable names in CamelCase. Let's hope
Mikrotik never ever introduces property names in CamelCase...

*fingers crossed*
2019-01-04 12:35:34 +01:00