mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-15 01:19:29 +02:00
Initial import into v3 branch
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.fw
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
N=$1
|
||||
|
||||
if which opendiff > /dev/null 2>&1; then
|
||||
TOOL="opendiff"
|
||||
elif which tkdiff > /dev/null 2>&1; then
|
||||
TOOL="tkdiff -b -B "
|
||||
else
|
||||
TOOL="diff -b -B "
|
||||
fi
|
||||
|
||||
${TOOL} firewall${N}.fw.orig firewall${N}.fw
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$XMLFILE=@ARGV[0];
|
||||
|
||||
$DIFFCMD="diff -C 1 -b -B -c -I \"# Generated\" -I 'Activating ' -I '# Firewall Builder fwb_ipfw v' ";
|
||||
|
||||
while (<>) {
|
||||
$str=$_;
|
||||
while ( $str=~ /<Firewall / ) {
|
||||
$str=~ /<Firewall [^>]+name="([^"]*).*$"/;
|
||||
$fw=$1;
|
||||
printf "$DIFFCMD %s.fw.orig %s.fw\n",$fw,$fw;
|
||||
$str=~ s/^.*<Firewall [^>]+name="$fw"[^>]+>//;
|
||||
}
|
||||
}
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
for f in *.fw; do
|
||||
j=${f}.orig
|
||||
mv $f $j
|
||||
done
|
||||
|
||||
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$XMLFILE=@ARGV[0];
|
||||
|
||||
|
||||
while (<>) {
|
||||
$str=$_;
|
||||
while ( $str=~ /<Firewall / ) {
|
||||
$str=~ /<Firewall [^>]+name="([^"]*).*$"/;
|
||||
$fw=$1;
|
||||
printf "fwb_ipfw -v -f $XMLFILE $fw\n";
|
||||
$str=~ s/^.*<Firewall [^>]+name="$fw"[^>]+>//;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user