diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-23 22:57:55 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-23 22:57:55 +0100 |
commit | 8062753241f2c510c94b0fec6f2552950e0c8014 (patch) | |
tree | 6aeed21b783cf7d9f8bb377c44846d5c57dd4a26 /7/main.pl | |
parent | ba29b490ffddd28bb09235a1bd0e99df73bfa064 (diff) | |
download | prolog-firewall-8062753241f2c510c94b0fec6f2552950e0c8014.tar.gz prolog-firewall-8062753241f2c510c94b0fec6f2552950e0c8014.tar.bz2 prolog-firewall-8062753241f2c510c94b0fec6f2552950e0c8014.tar.xz prolog-firewall-8062753241f2c510c94b0fec6f2552950e0c8014.zip |
wip
Diffstat (limited to '7/main.pl')
-rw-r--r-- | 7/main.pl | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -22,10 +22,10 @@ print_warnings :- ; format("No warnings!~n", []) ). -rm_rf(Dir) :- +rm_rf(Parents) :- + path_segments(Dir, Parents), directory_files(Dir, Files), - path_segments(Dir, Ps), - rm_rf_files(Ps, Files). + rm_rf_files(Parents, Files). rm_rf_files(_, []). rm_rf_files(Parents, [D|Dir]) :- @@ -47,6 +47,6 @@ rm_rf_files(Parents, [D|Dir]) :- main :- bgp:create_firewall, print_warnings, - bgp:bird_config(BirdDict), - rm_rf("host_vars"), - yaml_write(current_output, BirdDict). + path_segments("host_vars", Path), + rm_rf(Path), + firewall:write(Path). |