check-routeros-update: allow update for cap
If CAPsMAN is running on a device with just 16MB flash downloading the packages is not possible (or at least lost at reboot). So allow a CAP to update with opt-in.
This commit is contained in:
parent
877e95d4be
commit
d5edcbd3b6
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
:global Identity;
|
:global Identity;
|
||||||
:global SafeUpdateNeighbor;
|
:global SafeUpdateNeighbor;
|
||||||
|
:global SafeUpdateOnCap;
|
||||||
:global SafeUpdatePatch;
|
:global SafeUpdatePatch;
|
||||||
:global SafeUpdateUrl;
|
:global SafeUpdateUrl;
|
||||||
:global SentRouterosUpdateNotification;
|
:global SentRouterosUpdateNotification;
|
||||||
|
@ -37,7 +38,8 @@ $WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ :len [ / system package find where name="wireless" disabled=no ] ] > 0) do={
|
:if ([ :len [ / system package find where name="wireless" disabled=no ] ] > 0) do={
|
||||||
:if ([ / interface wireless cap get enabled ] = true && \
|
:if ([ / interface wireless cap get enabled ] = true && \
|
||||||
[ / caps-man manager get enabled ] = false) do={
|
[ / caps-man manager get enabled ] = false && \
|
||||||
|
$SafeUpdateOnCap != true) do={
|
||||||
$LogPrintExit2 error $0 ("System is managed by CAPsMAN, not checking for RouterOS version.") true;
|
$LogPrintExit2 error $0 ("System is managed by CAPsMAN, not checking for RouterOS version.") true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ safe versions from a web server. The configuration goes to
|
||||||
`global-config-overlay`, this is the parameter:
|
`global-config-overlay`, this is the parameter:
|
||||||
|
|
||||||
* `SafeUpdateNeighbor`: install updates automatically if seen in neighbor list
|
* `SafeUpdateNeighbor`: install updates automatically if seen in neighbor list
|
||||||
|
* `SafeUpdateOnCap`: check for updates even if device is managed by CAPsMAN
|
||||||
* `SafeUpdatePatch`: install patch updates automatically
|
* `SafeUpdatePatch`: install patch updates automatically
|
||||||
* `SafeUpdateUrl`: url to check for safe update, the channel (`long-term`,
|
* `SafeUpdateUrl`: url to check for safe update, the channel (`long-term`,
|
||||||
`stable` or `testing`) is appended
|
`stable` or `testing`) is appended
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
# Make sure all configuration properties are up to date and this
|
# Make sure all configuration properties are up to date and this
|
||||||
# value is in sync with value in script 'global-functions'!
|
# value is in sync with value in script 'global-functions'!
|
||||||
:global GlobalConfigVersion 58;
|
:global GlobalConfigVersion 59;
|
||||||
|
|
||||||
# This is used for DNS and backup file.
|
# This is used for DNS and backup file.
|
||||||
:global Domain "example.com";
|
:global Domain "example.com";
|
||||||
|
@ -92,6 +92,8 @@
|
||||||
:global SafeUpdatePatch false;
|
:global SafeUpdatePatch false;
|
||||||
# Allow to install updates automatically if seen in neighbor list.
|
# Allow to install updates automatically if seen in neighbor list.
|
||||||
:global SafeUpdateNeighbor false;
|
:global SafeUpdateNeighbor false;
|
||||||
|
# Allow to install updates even if device is managed by CAPsMAN.
|
||||||
|
:global SafeUpdateOnCap false;
|
||||||
|
|
||||||
# These thresholds control when to send health notification
|
# These thresholds control when to send health notification
|
||||||
# on temperature and voltage.
|
# on temperature and voltage.
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# Make sure all configuration properties are up to date and this
|
# Make sure all configuration properties are up to date and this
|
||||||
# value is in sync with value in script 'global-functions'!
|
# value is in sync with value in script 'global-functions'!
|
||||||
# Comment or remove to disable news and change notifications.
|
# Comment or remove to disable news and change notifications.
|
||||||
:global GlobalConfigVersion 58;
|
:global GlobalConfigVersion 59;
|
||||||
|
|
||||||
# Copy configuration from global-config here and modify it.
|
# Copy configuration from global-config here and modify it.
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
56="Added tags in all backup, lease and ppp-on-up scripts. These are used by 'packages-update', 'lease-script' and 'ppp-on-up' to find the scripts.";
|
56="Added tags in all backup, lease and ppp-on-up scripts. These are used by 'packages-update', 'lease-script' and 'ppp-on-up' to find the scripts.";
|
||||||
57="Celebrating the 1.000th commit - Hooray!";
|
57="Celebrating the 1.000th commit - Hooray!";
|
||||||
58="Added a cleanup script for 'hotspot-to-wpa' to purge old access list entries.";
|
58="Added a cleanup script for 'hotspot-to-wpa' to purge old access list entries.";
|
||||||
|
59="Updating CAP with 'check-routeros-update' is now possible with opt-in.";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Migration steps to be applied on script updates
|
# Migration steps to be applied on script updates
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# https://git.eworm.de/cgit/routeros-scripts/about/
|
# https://git.eworm.de/cgit/routeros-scripts/about/
|
||||||
|
|
||||||
# expected configuration version
|
# expected configuration version
|
||||||
:global ExpectedConfigVersion 58;
|
:global ExpectedConfigVersion 59;
|
||||||
|
|
||||||
# global variables not to be changed by user
|
# global variables not to be changed by user
|
||||||
:global GlobalFunctionsReady false;
|
:global GlobalFunctionsReady false;
|
||||||
|
|
Loading…
Reference in New Issue