mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 17:28:35 +02:00
Use 'ip route list' rather than 'ip route ls' for busybox compatability
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5126c439a4
commit
4f5970b5f2
@ -730,7 +730,7 @@ sub start_providers() {
|
|||||||
emit ( '#',
|
emit ( '#',
|
||||||
'# Capture the default route(s) if we don\'t have it (them) already.',
|
'# Capture the default route(s) if we don\'t have it (them) already.',
|
||||||
'#',
|
'#',
|
||||||
"[ -f \${VARDIR}/default_route ] || \$IP -$family route ls | save_default_route > \${VARDIR}/default_route",
|
"[ -f \${VARDIR}/default_route ] || \$IP -$family route list | save_default_route > \${VARDIR}/default_route",
|
||||||
'#',
|
'#',
|
||||||
'# Initialize the file that holds \'undo\' commands',
|
'# Initialize the file that holds \'undo\' commands',
|
||||||
'#',
|
'#',
|
||||||
|
@ -569,7 +569,7 @@ restore_default_route() # $1 = USE_DEFAULT_RT
|
|||||||
#
|
#
|
||||||
# We didn't restore a default route with metric 0
|
# We didn't restore a default route with metric 0
|
||||||
#
|
#
|
||||||
if $IP -4 -o route ls 2> /dev/null | fgrep default | fgrep -qv metric; then
|
if $IP -4 -o route list 2> /dev/null | fgrep default | fgrep -qv metric; then
|
||||||
#
|
#
|
||||||
# But we added a default route with metric 0
|
# But we added a default route with metric 0
|
||||||
#
|
#
|
||||||
|
@ -557,7 +557,7 @@ restore_default_route() # $1 = USE_DEFAULT_RT
|
|||||||
#
|
#
|
||||||
# We didn't restore a default route with metric 0
|
# We didn't restore a default route with metric 0
|
||||||
#
|
#
|
||||||
if $IP -6 -o route ls 2> /dev/null | fgrep default | fgrep -qv metric; then
|
if $IP -6 -o route list 2> /dev/null | fgrep default | fgrep -qv metric; then
|
||||||
#
|
#
|
||||||
# But we added a default route with metric 0
|
# But we added a default route with metric 0
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user