From c6d7ca6e1457754adfbf06cf22b12c4efa55c481 Mon Sep 17 00:00:00 2001 From: Albert Martinez Date: Mon, 17 Sep 2018 22:37:04 +0200 Subject: Update openbsd.rb (#1490) * Update openbsd.rb Routing table shows triggered diffs and the static routes are already in the /etc/hostname.* files defined --- CHANGELOG.md | 2 +- lib/oxidized/model/openbsd.rb | 30 ++++++++---------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a03ab74..fac6e61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ * FEATURE: add Comtrol model (@RobbFromIT) * BUGFIX: netgear telnet password prompt not detected * BUGFIX: xos model should not modify config on legacy Extreme Networks devices (@sq9mev) -* BUGFIX: model edgecos, ciscosmb +* BUGFIX: model edgecos, ciscosmb, openbsd * MISC: bump Dockerfile phusion/baseimage:0.10.0 -> 0.10.1 * MISC: Added verbiage to set OXIDIZED_HOME correctly under Debian 8.8 w/systemd * MISC: add gpgme and sequel gems to Dockerfile for sources diff --git a/lib/oxidized/model/openbsd.rb b/lib/oxidized/model/openbsd.rb index 898e9e3..1b863dc 100644 --- a/lib/oxidized/model/openbsd.rb +++ b/lib/oxidized/model/openbsd.rb @@ -24,38 +24,24 @@ class Openbsd < Oxidized::Model cfg = add_comment('HOSTNAME FILE') cfg += cmd('cat /etc/myname') - cfg += add_comment('HOSTS FILE') - cfg += cmd('cat /etc/hosts') - - cfg += add_comment('INTERFACE FILES') - cfg += cmd('tail -n +1 /etc/hostname.*') - cfg += add_comment('RESOLV.CONF FILE') cfg += cmd('cat /etc/resolv.conf') cfg += add_comment('NTP.CONF FILE') cfg += cmd('cat /etc/ntp.conf') - cfg += add_comment('IP ROUTES PER ROUTING DOMAIN') - cfg += add_small_comment('Routing Domain 0') - cfg += cmd('route -T0 exec netstat -rn') - cfg += add_small_comment('Routing Domain 1') - cfg += cmd('route -T1 exec netstat -rn') - cfg += add_small_comment('Routing Domain 2') - cfg += cmd('route -T2 exec netstat -rn') - cfg += add_small_comment('Routing Domain 3') - cfg += cmd('route -T3 exec netstat -rn') - cfg += add_small_comment('Routing Domain 4') - cfg += cmd('route -T4 exec netstat -rn') - cfg += add_small_comment('Routing Domain 5') - cfg += cmd('route -T5 exec netstat -rn') + cfg += add_comment('PF FILE') + cfg += cmd('cat /etc/pf.conf') + + cfg += add_comment('HOSTS FILE') + cfg += cmd('cat /etc/hosts') + + cfg += add_comment('INTERFACE FILES') + cfg += cmd('tail -n +1 /etc/hostname.*') cfg += add_comment('SNMP FILE') cfg += cmd('cat /etc/snmpd.conf') - cfg += add_comment('PF FILE') - cfg += cmd('cat /etc/pf.conf') - cfg += add_comment('MOTD FILE') cfg += cmd('cat /etc/motd') -- cgit v1.2.1