From a1606402d1628e7998601c29e6f1043c34a30ebc Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 6 Jul 2022 12:54:40 +0200 Subject: [PATCH] global-config: new setting to disable news and change notifications... ... and also drop the version from global-config and global-config-overlay. --- README.d/05-edit-global-config-overlay.avif | Bin 6602 -> 5124 bytes doc/backup-cloud.d/notification.svg | 2 +- doc/backup-upload.d/notification.svg | 2 +- doc/check-routeros-update.d/notification.svg | 2 +- global-config | 5 ++-- global-config-overlay | 5 ---- global-config.changes | 1 + global-functions | 24 ++++++++----------- 8 files changed, 16 insertions(+), 25 deletions(-) diff --git a/README.d/05-edit-global-config-overlay.avif b/README.d/05-edit-global-config-overlay.avif index e08fde82b9fb85072bcee6310daf92cbbf795da5..f2f0f2d88aa5534ce9ffed56b2e2b95dd7ce8539 100644 GIT binary patch delta 4637 zcmV+&65{R3GlVFRegYEek$_490Q8Z}NEQetr`gx{(Li{ z=o!WB-Pp3gLOFN;2|Xxaaa?Y!(L2A6bdy7IWO)k%8ZQ!R$Ss37C*L{MO;aUUWXfXX zm$aP{EWQ+wuZ#?85N1|p@YQF`!g_alY=13YuF>YS0pLJa8@_l#cwM^Lvu1)?>;78- zEBpBFOnV&FFh&s+@VFM&nf4)vb1kwt126P>?D?od_1=TaVsjBr1ejz7E9V?seM$*z z4vPm*g}>O5;~aTa7pYr}M31pH+7^J|=Ace~048N{amfNmYZxy^96DL7-Y~|O=YRRn zq`N`Vmt4v+n_FqgQC{g{Dy2_dX{q=P;N*2YzD-%d^H}Jv(#L&W^9M7~0;xYzE%S1k zs|C7-zM2i>8i+ld{;~z<$fomgHiCBx&(-5=ZnR`NFZV9q$4)IC%0DfnX)Y%{i9i)k zX*EFJrxBurN!W7`w{XK9bkP(%Uw`Egcc_^6(GjQ&)M(2dC_l^eqSd->NZ{xK5SYG`*aN~>+Uh0T#mSpo zQ9?^eH>5)BUWQ}DX|JFmjoS3^R(`;v)u0jw>qQ1aryzx>4q=%!d-H^em{Kh0;t0|z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aJlJF5!MtS}hoaJKWqru- zPwIauFjer9_UqK?YU+@00bSAKae5bY-BW+qJBa38KB+u}3DpVF7@Vn+l|B5sh^^|_ zNhdx;1H=mCHpg(7eBkMrToikv*o^ZH{oBpjJ!3y^7?y&rwUqKepz~1IFsFPgS3+Sl z>;sEQ;z1$8>dbG|^|0EHL4Z;BJDU=x_TGQx29j*r?o^UAWJcnMO!z=8{TKp+1oDkW z7vQGd#nx4>beZHCqdJP=U4uWr8^1Z!CX`Z2x0}DZtwY3jN{u-@%%lMpyF7njx?*uigGN!+Tx4Z&lzfSDb%X z#288q&`$g&``kt4fdF^Z;@i-Rbo|qvykI}ZG70WNEdhFCnt;0B{8g|(e)z_ znJ#5Ulyh6??PgLb)DLv;+RsJw=Qq6x$c#Vsr730PghJqy|vAxx5gSFUOqUk0u#5oao zPDRh$r@NC8)ULcP$x#-=R6KuWY|G(F z+lO#l32(0dISu1wgg{DnfDdAAADn)`yl$}`-QxA-TF=k1 zAZ;qd#EsfEk-Ru);1V4TYsz}(2Nf}hv&Smc;S&u~x%puJPC}p5#cFFbtG=k{95Xa$ zdu}ZbeM0rkqxDuhF(YJ-E!BVD@<;0gLOd{ay#0X$w2xc-kgNs)yI@U@`_AEMf#X8U zGDD$7z1GD-4Olw-!=U(1_6K7s->QEns`zU znzdzJ!S6VmiK*u&nM$u>as}3rJz5A{fV_a5yFRHV&vux{?IHtc?3*(M6j#lU#@=jioeb0*4ZZKc4AF9+qvbkm Current: 78 + id="tspan13491"> Version: 83 Current: 78 + id="tspan10793"> Version: 83 Current: 78 + id="tspan13565"> Version: 83 "revision") ] . \ "\nSerial number: " . $RouterBoard->"serial-number") ] . \ [ $IfThenElse ([ :len ($License->"level") ] > 0) \ - ("\nLicense: " . $License->"level") ] . \ + ("\nLicense: " . $License->"level") ] . \ "\nRouterOS:" . \ "\n Channel: " . $Update->"channel" . \ "\n Installed: " . $Update->"installed-version" . \ @@ -220,11 +219,9 @@ ("\n Available: " . $Update->"latest-version") ] . \ [ $IfThenElse ($RouterBoard->"routerboard" = true && \ $RouterBoard->"current-firmware" != $RouterBoard->"upgrade-firmware") \ - ("\n Firmware: " . $RouterBoard->"current-firmware") ] . \ + ("\n Firmware: " . $RouterBoard->"current-firmware") ] . \ "\nRouterOS-Scripts:" . \ - "\n Current: " . $GlobalConfigVersion . \ - [ $IfThenElse ($GlobalConfigVersion != $ExpectedConfigVersion) \ - ("\n Expected: " . $ExpectedConfigVersion) ]); + "\n Version: " . $ExpectedConfigVersion); } # download package from upgrade server @@ -753,9 +750,9 @@ :local NewComment [ :tostr $2 ]; :global ExpectedConfigVersion; - :global GlobalConfigVersion; :global Identity; :global IDonate; + :global NoNewsAndChangesNotification; :global NotificationsWithSymbols; :global ScriptUpdatesBaseUrl; :global ScriptUpdatesFetch; @@ -926,16 +923,15 @@ } :if ($SentConfigChangesNotification != $ExpectedConfigVersion && \ - $GlobalConfigVersion < $ExpectedConfigVersion) do={ - :local NotificationMessage ("Current configuration on " . $Identity . \ - " is out of date. Please update global-config-overlay, then increase " . \ - "\$GlobalConfigVersion (currently " . $GlobalConfigVersion . \ - ") to " . $ExpectedConfigVersion . " and re-run global-config."); + $NoNewsAndChangesNotification != true) do={ + :local NotificationMessage ("The configuration version on " . $Identity . " increased " . \ + "to " . $ExpectedConfigVersion . ", current configuration may need modification. " . \ + "Please review and update global-config-overlay, then re-run global-config."); $LogPrintExit2 info $0 ($NotificationMessage) false; :if ([ :len $GlobalConfigChanges ] > 0) do={ :set NotificationMessage ($NotificationMessage . "\n\nChanges:"); - :for I from=($GlobalConfigVersion + 1) to=$ExpectedConfigVersion do={ + :for I from=($ExpectedConfigVersionBefore + 1) to=$ExpectedConfigVersion do={ :local Change ($GlobalConfigChanges->[ :tostr $I ]); :set NotificationMessage ($NotificationMessage . "\n " . \ [ $IfThenElse ($NotificationsWithSymbols = true) ("\E2\97\8F") "*" ] . " " . $Change);