mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-23 19:57:21 +01:00
20 lines
493 B
Bash
Executable File
20 lines
493 B
Bash
Executable File
#!/usr/bin/perl
|
|
|
|
$XMLFILE=@ARGV[0];
|
|
|
|
$DIFFCMD="diff -C 1 -b -B -c -I \"# Generated\" -I 'Activating ' -I '# Firewall Builder fwb_ipf v' ";
|
|
|
|
|
|
while (<>) {
|
|
$str=$_;
|
|
while ( $str=~ /<Firewall / ) {
|
|
$str=~ /<Firewall [^>]+name="([^"]*).*$"/;
|
|
$fw=$1;
|
|
printf "$DIFFCMD %s.fw.orig %s.fw\n",$fw,$fw;
|
|
printf "$DIFFCMD %s-ipf.conf.orig %s-ipf.conf\n",$fw,$fw;
|
|
printf "$DIFFCMD %s-nat.conf.orig %s-nat.conf\n",$fw,$fw;
|
|
$str=~ s/^.*<Firewall [^>]+name="$fw"[^>]+>//;
|
|
}
|
|
}
|
|
|