aboutsummaryrefslogtreecommitdiff
path: root/init.d/staticroute.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/staticroute.in')
-rw-r--r--init.d/staticroute.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/init.d/staticroute.in b/init.d/staticroute.in
index 9f38b562..9995d37f 100644
--- a/init.d/staticroute.in
+++ b/init.d/staticroute.in
@@ -50,7 +50,7 @@ dump_args()
do_routes()
{
- local xtra=
+ local xtra= family=
[ "$RC_UNAME" != Linux ] && xtra=-q
ebegin "$1 static routes"
@@ -74,7 +74,14 @@ do_routes()
ip route $2 $args
;;
*)
- route $xtra $2 -$args
+ # Linux route does cannot work it out ...
+ if [ "$RC_UNAME" = Linux ]; then
+ case "$args" in
+ *:*) family="-A inet6";;
+ *) family=;;
+ esac
+ fi
+ route $famly $xtra $2 -$args
;;
esac
veend $?