View | Details | Raw Unified | Return to bug 143329
Collapse All | Expand All

(-)sbin/ifup-dhcp (-2 / +22 lines)
Lines 63-68 case "${SCRIPTNAME}" in Link Here
63
	ifup-*) ACTION=start ;;
63
	ifup-*) ACTION=start ;;
64
	ifdown-*) ACTION=stop ;;
64
	ifdown-*) ACTION=stop ;;
65
	ifstatus-*) ACTION=status ;;
65
	ifstatus-*) ACTION=status ;;
66
	ifrenew-*) ACTION=renew ;;
66
	*) usage
67
	*) usage
67
esac
68
esac
68
69
Lines 141-147 DHCLIENT=${DHCLIENT_BIN##*/} Link Here
141
142
142
143
143
case "$ACTION" in
144
case "$ACTION" in
144
	start)
145
	start|renew)
145
		# avoid that the temporary resolv.conf will persist after the client stops
146
		# avoid that the temporary resolv.conf will persist after the client stops
146
		# just because there hasn't been any resolv.conf to back up
147
		# just because there hasn't been any resolv.conf to back up
147
		test -e /etc/resolv.conf || touch /etc/resolv.conf
148
		test -e /etc/resolv.conf || touch /etc/resolv.conf
Lines 163-169 case "$ACTION" in Link Here
163
			fi
164
			fi
164
		fi
165
		fi
165
166
166
		if checkproc $DHCLIENT_BIN || [ "$DHCLIENT_PRIMARY_DEVICE" = no ]; then
167
		if [ "$ACTION" = 'start' ] \
168
			&& ( checkproc $DHCLIENT_BIN || [ "$DHCLIENT_PRIMARY_DEVICE" = no ]); then
167
			
169
			
168
			# let's first test if the running dhcpcd actually runs on this
170
			# let's first test if the running dhcpcd actually runs on this
169
			# interface, because then we don't want to start another one:
171
			# interface, because then we don't want to start another one:
Lines 206-211 case "$ACTION" in Link Here
206
208
207
				test -f ./ifcfg-$CONFIG && . ./ifcfg-$CONFIG
209
				test -f ./ifcfg-$CONFIG && . ./ifcfg-$CONFIG
208
			fi
210
			fi
211
212
		elif [ "$ACTION" = 'renew' ]; then
213
			case $DHCLIENT in 
214
			dhcpcd) 
215
				for i in `pidof $DHCLIENT`; do
216
					case $(cat /proc/$i/cmdline) in
217
						*$INTERFACE*) dhcpcd_on_device="$dhcpcd_on_device $i"
218
					esac
219
				done
220
				for i in $dhcpcd_on_device; do
221
					kill -TERM $i &>/dev/null
222
				done
223
				sleep 1
224
				;;
225
			dhclient)
226
				killproc $PIDFILE $DHCLIENT_BIN &>/dev/null 
227
				;;
228
			esac
209
		fi
229
		fi
210
230
211
		debug "Starting service dhcp client on $INTERFACE"
231
		debug "Starting service dhcp client on $INTERFACE"

Return to bug 143329