blob: 26399108e3c66dcc5f6644284bc712686c132a57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--- old/lib.providers
+++ new/lib.providers
@@ -141,7 +141,7 @@
# Add Provider $table ($number)
#
__EOF__
- save_command "if interface_is_usable $interface; then"
+ save_command "if [ -n \"$interface\" ] && interface_is_usable \"$interface\"; then"
save_indent1="$INDENT"
INDENT="$INDENT "
@@ -283,7 +283,14 @@
INDENT="$save_indent1"
save_command else
- if [ -n "$optional" ]; then
+ if [ "${interface:--}" = "-" -a "${duplicate:--}" = "-" -a "${gateway:--}" = "-" -a "${options:--}" = "-" -a "${copy:--}" = "-" ]; then
+ indent >&3 << __EOF__
+
+progress_message " Provider $table ($number) Added"
+
+__EOF__
+
+ elif [ -n "$optional" ]; then
save_command " error_message \"WARNING: Interface $interface is not configured -- Provider $table ($number) not Added\""
save_command " ${iface}_up="
else
@@ -316,10 +323,6 @@
[ "x$source" = x- ] && source=
[ "x$dest" = x- ] && dest= || dest="to $dest"
- [ -n "${source}${dest}" ] || fatal_error "You must specify either the source or destination in an rt rule: \"$rule\""
-
- [ -n "${dest:=to 0.0.0.0/0}" ]
-
if [ -n "$source" ]; then
case $source in
*:*)
@@ -332,8 +335,6 @@
source="iif $source"
;;
esac
- else
- source='from 0.0.0.0/0'
fi
case "$priority" in
|