summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2005-12-06 12:28:25 +0000
committerChristian Heim <phreak@gentoo.org>2005-12-06 12:28:25 +0000
commitf62636483b16222c394fa17c635d74017cf215ba (patch)
tree22039adb2bfc850dd02b1a2508f5f0c975b56f91 /net-scripts/net.modules.d/dhclient
parentfix openvz /proc handling; cleanup (diff)
downloadbaselayout-vserver-f62636483b16222c394fa17c635d74017cf215ba.tar.gz
baselayout-vserver-f62636483b16222c394fa17c635d74017cf215ba.tar.bz2
baselayout-vserver-f62636483b16222c394fa17c635d74017cf215ba.zip
Importing latest baselayout/trunk changes. Merging revision 1773.
svn path=/baselayout-vserver/trunk/; revision=160
Diffstat (limited to 'net-scripts/net.modules.d/dhclient')
-rw-r--r--net-scripts/net.modules.d/dhclient10
1 files changed, 7 insertions, 3 deletions
diff --git a/net-scripts/net.modules.d/dhclient b/net-scripts/net.modules.d/dhclient
index 37861b0..25e8d85 100644
--- a/net-scripts/net.modules.d/dhclient
+++ b/net-scripts/net.modules.d/dhclient
@@ -45,10 +45,12 @@ dhclient_stop() {
local pid=$( < "${pidfile}" )
local ifvar=$( bash_variable "${iface}" )
- d="dhcp_${ifvar}[@]"
+ d="dhcp_${ifvar}"
+ d=" ${!d} "
+ [[ ${d} == " " ]] && d=" ${dhcp} "
ebegin "Stopping dhclient on ${iface}"
- if [[ " ${!d} " == *" release "* ]]; then
+ if [[ ${d} == *" release "* ]]; then
local r=$( dhclient -q -r -pf "${pidfile}" \
-sf "${MODULES_DIR}/helpers.d/dhclient-wrapper" "${iface}" )
[[ ${r} == "deconfig" ]]
@@ -115,9 +117,11 @@ dhclient_start() {
fi
d="dhcp_${ifvar}"
+ d=" ${!d} "
+ [[ ${d} == " " ]] && d=" ${dhcp} "
# Send our hostname by editing cffile
- if ${edit} && [[ -e ${cffile} && " ${!d} " != *" nosendhost "* ]] ; then
+ if ${edit} && [[ -e ${cffile} && ${d} != *" nosendhost "* ]] ; then
local hname=$( hostname )
if [[ ${hname} != "(none)" && ${hname} != "localhost" ]]; then
sed -i '/^[ \t]*send[ \t]*host-name[ \t]*/d' "${cffile}"