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

Collapse All | Expand All

(-)file_not_specified_in_diff (-61 / +1 lines)
Lines 18-29 Link Here
18
extra_commands="save load unload"
19
save_cmd="ipfw_save"
20
load_cmd="ipfw_load"
21
unload_cmd="ipfw_unload"
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
Lines 44-82 Link Here
44
ipfw_save()
45
{
46
	# Saves the firewall rules to /var/db/ipfw/$savename
47
	[ ! -d /var/db/ipfw ] && mkdir /var/db/ipfw && chmod go-rwx /var/db/ipfw
48
	ipfw list | awk '{print "${fw6cmd2} " $0 }' > /var/db/ipfw/$savename.6
49
}
50
51
ipfw_load()
52
{
53
54
    # Set quiet mode if requested
55
    case ${firewall_quiet} in
56
    [Yy][Ee][Ss])
57
        fwcmd2="/sbin/ipfw -q add"
58
        ;;
59
    *)
60
        fwcmd2="/sbin/ipfw add"
61
        ;;
62
    esac
63
64
    . /var/db/ipfw/$savename.6
65
}
66
67
ipfw_unload()
68
{
69
70
    # Set quiet mode if requested
71
    case ${firewall_quiet} in
72
    [Yy][Ee][Ss])
73
        fwcmd2="/sbin/ipfw -q delete"
74
        ;;
75
    *)
76
        fwcmd2="/sbin/ipfw delete"
77
        ;;
78
    esac
79
80
    . /var/db/ipfw/$savename.6
81
}
82
Lines 85-92 Link Here
85
	# Make sure the save file exists if one is specified.
86
	if [ ! -z "$usingsave" ]; then
87
		if [ ! -f "/var/db/ipfw/$savename.6" ]; then
88
			echo "Specified save does not exist"
89
			exit 1
90
		fi
91
	fi
92
												
Line 101 Link Here
101
		. "${ipv6_firewall_script}" $savename
42
		. "${ipv6_firewall_script}"
102
--

Return to bug 93815