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:
Tom Eastep 2011-04-15 11:15:32 -07:00
parent 5126c439a4
commit 4f5970b5f2
3 changed files with 3 additions and 3 deletions

View File

@ -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',
'#',

View File

@ -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
#

View File

@ -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
#