You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In RouterOS v7 there is a new time based system comment.
When exporting the configuration, an additional line is automatically added.
/export
# 2024-03-11 19:15:14 by RouterOS 7.14.1
I had to edit the routeros.rb file to avoid unnecessary configuration loading.
cmdrun_cmddo |cfg|
cfg.gsub!/\\\r?\n\s+/,''# strip new linecfg.gsub!/# inactive time\r\n/,''# Remove time based system commentcfg.gsub!/# received packet from \S+ bad format\r\n/,''# Remove intermittent VRRP/CARP collision commentcfg.gsub!/# poe-out status: short_circuit\r\n/,''# Remove intermittent POE short_circuit commentcfg.gsub!/# Firmware upgraded successfully, please reboot for changes to take effect!\r\n/,''# Remove transient firmware upgrade commentcfg.gsub!/# \S+ not ready\r\n/,''# Remove intermittent $interface not ready commentcfg.gsub!/# (....-..-..) (..:..:..) |by RouterOS|/,''# # Remove date and time of exportcfg=cfg.split("\n").reject{ |line| line[/^#\s\w{3}\/\d{2}\/\d{4}.*$/]}cfg.join("\n") + "\n"end
After adding the line “cfg.gsub! /# (....-..-..) (..:..:..) |by RouterOS|/, '' # Remove date and time of export” the configuration is no longer loaded unnecessarily.
The text was updated successfully, but these errors were encountered:
cfg.reject!{ |line| line[/^#\s\w{3}\/\d{2}\/\d{4}.*$/]}# Remove date time and 'by RouterOS' comment (v6)cfg.reject!{ |line| line[/^#\s\d{4}-\d{2}-\d{2}.*$/]}# Remove date time and 'by RouterOS' comment (v7)
In RouterOS v7 there is a new time based system comment.
When exporting the configuration, an additional line is automatically added.
I had to edit the routeros.rb file to avoid unnecessary configuration loading.
After adding the line “cfg.gsub! /# (....-..-..) (..:..:..) |by RouterOS|/, '' # Remove date and time of export” the configuration is no longer loaded unnecessarily.
The text was updated successfully, but these errors were encountered: