diff --git a/lib.cf b/lib.cf index 0ed67c2..06d4f40 100644 --- a/lib.cf +++ b/lib.cf @@ -369,3 +369,27 @@ reports: } +bundle edit_line bind_mount(src,dst) +{ +insert_lines: + freebsd:: + "$(src) $(dst) nullfs rw,late 0 0"; + centos:: + "$(src) $(dst) none defaults,bind 0 0"; + +} + +bundle agent bind_mount(src,dst) +{ + +files: + "/etc/fstab" + edit_line => bind_mount("$(src)","$(dst)"), + classes => if_repaired(bind_mount_fstab_changed); +commands: + bind_mount_fstab_changed:: + "echo '$(src)$(dst)' > /dev/null && mount" + contain=>wmde_cmd_useshell, + args => "-a"; +} +