summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-scripts/net.modules.d/helpers.d/dhcp-state')
-rw-r--r--net-scripts/net.modules.d/helpers.d/dhcp-state20
1 files changed, 10 insertions, 10 deletions
diff --git a/net-scripts/net.modules.d/helpers.d/dhcp-state b/net-scripts/net.modules.d/helpers.d/dhcp-state
index 0b5d3c7..b16e6cc 100644
--- a/net-scripts/net.modules.d/helpers.d/dhcp-state
+++ b/net-scripts/net.modules.d/helpers.d/dhcp-state
@@ -1,11 +1,9 @@
-#!/bin/bash
# Copyright (c) 2005-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-
# Contributed by Roy Marples (uberlord@gentoo.org)
-. "${svclib}/sh/rc-services.sh"
-. "${svclib}/net.modules.d/helpers.d/functions"
+source "${svclib}/sh/rc-services.sh"
+source "${svclib}/net.modules.d/helpers.d/functions"
conf="$(add_suffix /etc/conf.d/net)"
[[ -e ${conf} ]] && source "${conf}"
@@ -18,11 +16,13 @@ else
service_inactive "${service}" && mark_service_started "${service}"
fi
-if [[ ${RC_AUTO_INTERFACE} == "yes" ]] ; then
- best_interface="$(select_best_interface)"
- apply_state "${best_interface}"
-elif [[ ${action} == "up" ]] ; then
- apply_state "${interface}"
+if service_started "${service}" || service_inactive "${service}" ; then
+ if [[ ${RC_AUTO_INTERFACE} == "yes" ]] ; then
+ best_interface="$(select_best_interface)"
+ apply_state "${best_interface}"
+ elif [[ ${action} == "up" ]] ; then
+ apply_state "${interface}"
+ fi
fi
-# vim:ts=4
+# vim: set ft=sh ts=4 :