View | Details | Raw Unified | Return to bug 93815 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +27 lines)
Line 19 Link Here
19
extra_commands="save"
20
save_cmd="ipfw_save"
21
22
23
#gets the name of the save to use
24
if [ ! -z $2 ]; then
25
	savename="$2"
26
	usingsave="yes"
27
else
28
	savename="last"
29
fi
Line 32 Link Here
43
ipfw_save()
44
{
45
        # Saves the firewall rules to /var/db/ipfw/$savename
46
	[ ! -d /var/db/ipfw ] && mkdir /var/db/ipfw && chmod go-rwx /var/db/ipfw
47
	ipfw list | awk '{print "${fwcmd} add " $0 }' > /var/db/ipfw/$savename
48
}
49
Line 34 Link Here
52
	# Make sure the save file exists if one is specified
53
	if [ ! -z $usingsave ]; then
54
		if [ ! -f "/var/db/ipfw/$savename" ]; then
55
		    echo "Specified save does not exist"
56
		    exit 1
57
		fi
58
	fi
59
Line 38 Link Here
38
		. "${firewall_script}"
64
		. "${firewall_script}" $savename
39
--

Return to bug 93815