mirror of
https://gitlab.com/shorewall/code.git
synced 2025-03-07 19:11:51 +01: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 ( '#',
|
||||
'# 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',
|
||||
'#',
|
||||
|
@ -569,7 +569,7 @@ restore_default_route() # $1 = USE_DEFAULT_RT
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
@ -557,7 +557,7 @@ restore_default_route() # $1 = USE_DEFAULT_RT
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user