summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2017-08-24 09:00:14 +0000
committerJulien Dessaux2017-08-24 09:03:46 +0000
commit3c84663f2becdfe7633ae4dfc91317bc19a8d272 (patch)
tree101a77724e66c67a4780c7ea23247e8ed28ec4c4
parentAdded a running enforce for inetd in check_mk policy (diff)
downloadmasterfiles-3c84663f2becdfe7633ae4dfc91317bc19a8d272.tar.gz
masterfiles-3c84663f2becdfe7633ae4dfc91317bc19a8d272.tar.bz2
masterfiles-3c84663f2becdfe7633ae4dfc91317bc19a8d272.zip
Generalised the rc.conf management for freebsd
Diffstat (limited to '')
-rw-r--r--services/check_mk.cf7
-rw-r--r--services/freebsd.cf14
2 files changed, 14 insertions, 7 deletions
diff --git a/services/check_mk.cf b/services/check_mk.cf
index e83ca06..dde8219 100644
--- a/services/check_mk.cf
+++ b/services/check_mk.cf
@@ -8,12 +8,6 @@ bundle agent check_mk
};
files:
freebsd::
- "/etc/rc.conf"
- create => "true",
- edit_defaults => std_defs,
- perms => system_owned("444"),
- edit_line => append_if_no_line("$(rc_conf_lines)"),
- classes => if_repaired("check_mk_rc_conf_file_repaired");
"/etc/services"
edit_defaults => std_defs,
perms => system_owned("444"),
@@ -39,7 +33,6 @@ bundle agent check_mk
"/usr/sbin/service inetd restart" classes => if_repaired("inetd_service_restarted");
reports:
any::
- "$(this.bundle): /etc/rc.conf repaired" ifvarclass => "check_mk_rc_conf_file_repaired";
"$(this.bundle): /etc/services repaired" ifvarclass => "check_mk_services_file_repaired";
"$(this.bundle): /etc/inetd.conf repaired" ifvarclass => "check_mk_inetd_conf_file_repaired";
"$(this.bundle): /usr/local/bin/check_mk_agent repaired" ifvarclass => "check_mk_agent_repaired";
diff --git a/services/freebsd.cf b/services/freebsd.cf
index 603c82d..730e799 100644
--- a/services/freebsd.cf
+++ b/services/freebsd.cf
@@ -6,4 +6,18 @@ bundle agent flavour
"bash",
"ncdu",
};
+ "rc_conf_lines" slist => {
+ @(check_mk.rc_conf_lines),
+ };
+ files:
+ freebsd::
+ "/etc/rc.conf"
+ create => "true",
+ edit_defaults => std_defs,
+ perms => system_owned("444"),
+ edit_line => append_if_no_line("$(rc_conf_lines)"),
+ classes => if_repaired("freebsd_rc_conf_file_repaired");
+ reports:
+ any::
+ "$(this.bundle): /etc/rc.conf repaired" ifvarclass => "freebsd_rc_conf_file_repaired";
}