summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-14 12:18:28 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-14 12:18:28 (EDT)
commitc6e174dddf79c1cb72ad7b3d8e3313ab3725630d (patch)
treef870a145afe5d34c329f31c038e9196bd7f501ec
parent5d6f963efc6c368d8a506a422a307c2a507523ee (diff)
/etc/init.d/networking: Look for interfaces.local.
Don't silently deconfigure before configuring in the start action. Use default restart action.
-rwxr-xr-xsrc.etc/init.d/networking18
1 files changed, 8 insertions, 10 deletions
diff --git a/src.etc/init.d/networking b/src.etc/init.d/networking
index f53899f..673cba5 100755
--- a/src.etc/init.d/networking
+++ b/src.etc/init.d/networking
@@ -3,19 +3,17 @@
start()
{
log 'Configuring network interfaces'
- ifdown -a >/dev/null 2>&1
- ifup -a
+ if [ -e /etc/network/interfaces.local ]; then
+ file=/etc/network/interfaces.local
+ else
+ file=/etc/network/interfaces
+ fi
+ ifup -a -i "${file}"
+ cp "${file}" /var/run/net-ifaces
}
stop()
{
log 'Deconfiguring network interfaces'
- ifdown -a
-}
-
-restart()
-{
- log 'Reconfiguring network interfaces'
- ifdown -a
- ifup -a
+ ifdown -a -i /var/run/net-ifaces
}