From 416da3b51fbcea3d494e80882a8d76f21e2d9a26 Mon Sep 17 00:00:00 2001 From: Tim de Boer Date: Thu, 1 Jun 2023 12:46:54 +0200 Subject: [PATCH 1/2] also remove new formatted date/time commment --- lib/oxidized/model/routeros.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oxidized/model/routeros.rb b/lib/oxidized/model/routeros.rb index d7234eb23..5baede0a3 100644 --- a/lib/oxidized/model/routeros.rb +++ b/lib/oxidized/model/routeros.rb @@ -45,7 +45,7 @@ class RouterOS < Oxidized::Model cfg.gsub! /# poe-out status: short_circuit\r\n/, '' # Remove intermittent POE short_circuit comment cfg.gsub! /# Firmware upgraded successfully, please reboot for changes to take effect!\r\n/, '' # Remove transient firmware upgrade comment cfg.gsub! /# \S+ not ready\r\n/, '' # Remove intermittent $interface not ready comment - cfg = cfg.split("\n").reject { |line| line[/^#\s\w{3}\/\d{2}\/\d{4}.*$/] } + cfg = cfg.split("\n").reject { |line| line[/^#\s\w{3}\/\d{2}\/\d{4}\s\d{2}:\d{2}:\d{2}.*$/] || line[/^#\s\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}.*$/] } # Remove date time and 'by RouterOS' comment cfg.join("\n") + "\n" end end From 1beee4ff8f412b2db76d5cc62080eb8d68e7b5cf Mon Sep 17 00:00:00 2001 From: Tim de Boer Date: Fri, 2 Jun 2023 14:29:41 +0200 Subject: [PATCH 2/2] also remove new formatted date/time commment --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d80f3f373..235e9a337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - fixed empty lines for ZyXEL GS1900 switches (@jluebbe) - fixed prompt for Watchguard FirewareOS not matching the regex when the node is non-master (@netdiver) +- fixed new date/time format with newer RouterOS `# jun/01/2023 12:11:25 by RouterOS 7.9.1` vs `# 2023-06-01 12:16:16 by RouterOS 7.10rc1` (@tim427) ## [0.29.1 - 2023-04-24]