projects
/
openwrt
/
svn-archive
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b890fe7
)
make sure only one dhcp client is active for one interface
author
Felix Fietkau
<
[email protected]
>
Wed, 7 Sep 2005 16:54:13 +0000
(16:54 +0000)
committer
Felix Fietkau
<
[email protected]
>
Wed, 7 Sep 2005 16:54:13 +0000
(16:54 +0000)
SVN-Revision: 1872
openwrt/package/base-files/default/etc/functions.sh
patch
|
blob
|
history
diff --git
a/openwrt/package/base-files/default/etc/functions.sh
b/openwrt/package/base-files/default/etc/functions.sh
index dfbdb873f7a9c3f95c2a1878e88e38f93f441417..2bf4a8d9989d55b922a48c829cda7f1ff838cd50 100755
(executable)
--- a/
openwrt/package/base-files/default/etc/functions.sh
+++ b/
openwrt/package/base-files/default/etc/functions.sh
@@
-66,7
+66,12
@@
do_ifup() {
DHCP_HOSTNAME=${DHCP_HOSTNAME%%.*}
[ -z $DHCP_HOSTNAME ] || DHCP_ARGS="$DHCP_ARGS -H $DHCP_HOSTNAME"
[ "$if_proto" = "pptp" ] && DHCP_ARGS="$DHCP_ARGS -n -q" || DHCP_ARGS="$DHCP_ARGS -R &"
+ oldpid=$(cat $pidfile)
${DEBUG:-eval} "udhcpc $DHCP_ARGS"
+ pidof udhcpc | grep "$oldpid" >&- 2>&- && {
+ sleep 1
+ kill -9 $oldpid
+ }
;;
none|"")
;;