summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-12-14 19:01:03 +0000
committerRoy Marples <roy@marples.name>2009-12-14 19:01:03 +0000
commit02c12c1caced4c2393e2ca15efdaca56d5f0d452 (patch)
treea901e751a30d992e98e106f04c9e817015d75d89
parent084f5e12eb6d42560c28076c349afd780eab125b (diff)
downloadopenrc-02c12c1caced4c2393e2ca15efdaca56d5f0d452.tar.gz
openrc-02c12c1caced4c2393e2ca15efdaca56d5f0d452.tar.bz2
openrc-02c12c1caced4c2393e2ca15efdaca56d5f0d452.tar.xz
Allow "dev eth0" to work for a default route.
-rw-r--r--init.d/network.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.d/network.in b/init.d/network.in
index f32bcb4..3beba1c 100644
--- a/init.d/network.in
+++ b/init.d/network.in
@@ -250,7 +250,8 @@ start()
if [ -n "$defaultroute" ]; then
ebegin "Setting default route $defaultroute"
- if [ "$RC_UNAME" = Linux ]; then
+ if [ "$RC_UNAME" = Linux -a \
+ "${defaultroute#dev }" = "$defaultroute" ]; then
route add default gw $defaultroute
else
route add default $defaultroute