Bugzilla – Attachment 63500 Details for
Bug 143329
tell dhcpcd to renew lease on interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
another try. this time kill dhcpcd and then use regular start path to start it again.
ifrenew.diff (text/plain), 1.51 KB, created by
Ludwig Nussel
on 2006-01-16 17:14:36 UTC
(
hide
)
Description:
another try. this time kill dhcpcd and then use regular start path to start it again.
Filename:
MIME Type:
Creator:
Ludwig Nussel
Created:
2006-01-16 17:14:36 UTC
Size:
1.51 KB
patch
obsolete
>Index: sbin/ifup-dhcp >=================================================================== >--- sbin.orig/ifup-dhcp >+++ sbin/ifup-dhcp >@@ -63,6 +63,7 @@ case "${SCRIPTNAME}" in > ifup-*) ACTION=start ;; > ifdown-*) ACTION=stop ;; > ifstatus-*) ACTION=status ;; >+ ifrenew-*) ACTION=renew ;; > *) usage > esac > >@@ -141,7 +142,7 @@ DHCLIENT=${DHCLIENT_BIN##*/} > > > case "$ACTION" in >- start) >+ start|renew) > # avoid that the temporary resolv.conf will persist after the client stops > # just because there hasn't been any resolv.conf to back up > test -e /etc/resolv.conf || touch /etc/resolv.conf >@@ -163,7 +164,8 @@ case "$ACTION" in > fi > fi > >- if checkproc $DHCLIENT_BIN || [ "$DHCLIENT_PRIMARY_DEVICE" = no ]; then >+ if [ "$ACTION" = 'start' ] \ >+ && ( checkproc $DHCLIENT_BIN || [ "$DHCLIENT_PRIMARY_DEVICE" = no ]); then > > # let's first test if the running dhcpcd actually runs on this > # interface, because then we don't want to start another one: >@@ -206,6 +208,24 @@ case "$ACTION" in > > test -f ./ifcfg-$CONFIG && . ./ifcfg-$CONFIG > fi >+ >+ elif [ "$ACTION" = 'renew' ]; then >+ case $DHCLIENT in >+ dhcpcd) >+ for i in `pidof $DHCLIENT`; do >+ case $(cat /proc/$i/cmdline) in >+ *$INTERFACE*) dhcpcd_on_device="$dhcpcd_on_device $i" >+ esac >+ done >+ for i in $dhcpcd_on_device; do >+ kill -TERM $i &>/dev/null >+ done >+ sleep 1 >+ ;; >+ dhclient) >+ killproc $PIDFILE $DHCLIENT_BIN &>/dev/null >+ ;; >+ esac > fi > > debug "Starting service dhcp client on $INTERFACE"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 143329
:
63404
| 63500