###################################################################### # # File editing # # Normal ordering: # - delete # - replace | column_edit # - insert # ###################################################################### body common control { version => "1.2.3"; bundlesequence => { "testbundle" }; } ######################################################## bundle agent testbundle { files: # Make a copy of the password file "/home/mark/tmp/passwd" link_from => linkdetails("/etc/passwd"), move_obstructions => "true"; "/home/mark/tmp/linktest" link_from => linkchildren("/usr/local/sbin"); #child links } ######################################################### body link_from linkdetails(tofile) { source => "$(tofile)"; link_type => "symlink"; when_no_source => "force"; # kill } ######################################################### body link_from linkchildren(tofile) { source => "$(tofile)"; link_type => "symlink"; when_no_source => "force"; # kill link_children => "true"; when_linking_children => "if_no_such_file"; # "override_file"; } ####################################################### # # Test dead link removal # ####################################################### body common control { any:: bundlesequence => { "testbundle" }; } ############################################ bundle agent testbundle { files: "/home/mark/tmp/test_to" -> "someone" depth_search => recurse("inf"), perms => modestuff, action => tell_me; } ############################################ body depth_search recurse(d) { rmdeadlinks => "true"; depth => "$(d)"; } ############################################ body perms modestuff { mode => "o-w"; } ############################################ body action tell_me { report_level => "inform"; }