summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-09-16 02:56:13 +0000
committermbr <mbr@FreeBSD.org>2003-09-16 02:56:13 +0000
commit961245240d0d3603c9e577506b78d7fdbdb896d6 (patch)
tree17fc308a5521ed913411ed293ba601ab6e017fad /etc/rc.d
parente7f6efc66e40dadef29371932d24cc99b093e8e5 (diff)
downloadFreeBSD-src-961245240d0d3603c9e577506b78d7fdbdb896d6.zip
FreeBSD-src-961245240d0d3603c9e577506b78d7fdbdb896d6.tar.gz
Get rid of a nasty error message that tells us
dhclient couldn't get killed. If we execute 'dhclient -r', dhclient gets already killed, so there is no need to do it twice. Only do this if we really have to release some leases. Reviewed by: silence on freebsd-rc@yahoogroups.com
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-xetc/rc.d/dhclient17
1 files changed, 13 insertions, 4 deletions
diff --git a/etc/rc.d/dhclient b/etc/rc.d/dhclient
index 895d34a..4df3bc2 100755
--- a/etc/rc.d/dhclient
+++ b/etc/rc.d/dhclient
@@ -53,8 +53,9 @@ dhclient_common()
dhclient_prestart()
{
- dhclient_common || return 1
-
+ if [ $dhclient_common_error -eq 1 ]; then
+ return 1
+ fi
for ifn in ${_cooked_list}; do
ifscript_up ${ifn}
done
@@ -78,8 +79,9 @@ dhclient_poststart()
dhclient_prestop()
{
- dhclient_common || return 1
-
+ if [ $dhclient_common_error -eq 1 ]; then
+ return 1
+ fi
for ifn in ${_cooked_list}; do
ipx_down ${ifn}
ifalias_down ${ifn}
@@ -110,4 +112,11 @@ if [ -n "$2" ]; then
fi
load_rc_config $name
+dhclient_common_error=0
+dhclient_common || dhclient_common_error=1;
+if [ -n "$_cooked_list" ]; then
+ if [ -s $pidfile ]; then
+ stop_cmd=":"
+ fi
+fi
run_rc_command "$1"
OpenPOWER on IntegriCloud