Bugzilla – Attachment 63404 Details for
Bug 143329
tell dhcpcd to renew lease on interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
patch for ifup
ifrenew.diff (text/plain), 1.55 KB, created by
Ludwig Nussel
on 2006-01-16 10:30:56 UTC
(
hide
)
Description:
patch for ifup
Filename:
MIME Type:
Creator:
Ludwig Nussel
Created:
2006-01-16 10:30:56 UTC
Size:
1.55 KB
patch
obsolete
>Index: sbin/ifup-dhcp >=================================================================== >--- sbin.orig/ifup-dhcp >+++ sbin/ifup-dhcp >@@ -63,9 +63,12 @@ case "${SCRIPTNAME}" in > ifup-*) ACTION=start ;; > ifdown-*) ACTION=stop ;; > ifstatus-*) ACTION=status ;; >+ ifrenew-*) ACTION=renew ;; > *) usage > esac > >+SAVED_ARGS=("$@") >+ > INTERFACE=$1 > case "$INTERFACE" in ""|-h|*help*) usage; esac > shift >@@ -384,6 +387,46 @@ case "$ACTION" in > ip link set down dev $INTERFACE > fi > ;; >+ renew) >+ debug "Renew lease on $INTERFACE" >+ >+ case $DHCLIENT in >+ dhcpcd) >+ if [ "$INTERFACE" = 'all' ]; then >+ killall -ALRM $DHCLIENT_BIN &>/dev/null >+ else >+ # let's first test if any dhcpcd processes are running on this >+ # interface. Unfortunately, the pid file is not there when it starts >+ # up, so we can't rely on that. Normally, only one process is running >+ # per interface. but we have made bad experiences with ...hotplug >+ for i in `pidof $DHCLIENT`; do >+ case $(cat /proc/$i/cmdline) in >+ *$INTERFACE*) dhcpcd_on_device="$dhcpcd_on_device $i" >+ esac >+ done >+ >+ if [ -z "$dhcpcd_on_device" ]; then >+ exec /sbin/ifup "$SAVED_ARGS" >+ fi >+ >+ # wait until the processes are gone >+ for i in $dhcpcd_on_device; do >+ kill -ALRM $i &>/dev/null >+ done >+ >+ true >+ fi >+ >+ ;; >+ >+ dhclient) >+ # no idea what to do here >+ message "renew for dhclient not supported" >+ false >+ ;; >+ esac >+ >+ ;; > status) > if test -z "`ip -o -f inet addr show $INTERFACE`"; then > # interface has currently no ipv4 address assigned
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