Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 907185 | Differences between
and this patch

Collapse All | Expand All

(-)dncpcd.sh.orig (-8 / +19 lines)
Lines 50-70 Link Here
50
			nonis)
50
			nonis)
51
				args="${args} -C yp.conf"
51
				args="${args} -C yp.conf"
52
				;;
52
				;;
53
			nogateway) args="${args} -G";;
53
			nogateway)
54
			nosendhost) args="${args} -h ''";
54
				args="${args} -G"
55
				;;
56
			nosendhost)
57
				args="${args} -h ''"
58
				;;
55
		esac
59
		esac
56
	done
60
	done
57
61
58
	# Add our route metric if not given
62
	# Add our route metric if not given
59
	case " ${args} " in
63
	case " ${args} " in
60
	*" -m "*) ;;
64
		*" -m "*)
61
	*) [ "${metric:-0}" != 0 ] && args="${args} -m ${metric}";;
65
			;;
66
		*)
67
			[ "${metric:-0}" != 0 ] && args="${args} -m ${metric}"
68
			;;
62
	esac
69
	esac
63
70
64
	# Bring up DHCP for this interface
71
	# Bring up DHCP for this interface
65
	ebegin "Running dhcpcd"
72
	ebegin "Running dhcpcd"
66
73
67
	eval dhcpcd "${args}" "${IFACE}"
74
	printf '%s %s' "${args}" "${IFACE}" | xargs -E '' dhcpcd
68
	eend $? || return 1
75
	eend $? || return 1
69
76
70
	_show_address
77
	_show_address
Lines 84-97 Link Here
84
		[ -z "${args}" ] && args=${dhcpcd}
91
		[ -z "${args}" ] && args=${dhcpcd}
85
	fi
92
	fi
86
	pidfile="$(dhcpcd -P ${args} ${IFACE})"
93
	pidfile="$(dhcpcd -P ${args} ${IFACE})"
87
	[ ! -f "${pidfile}" ] && return 0
94
	[ ! -f "${pidfile}" ] && return 0.
88
95
89
	ebegin "Stopping dhcpcd on ${IFACE}"
96
	ebegin "Stopping dhcpcd on ${IFACE}"
90
	eval opts=\$dhcp_${IFVAR}
97
	eval opts=\$dhcp_${IFVAR}
91
	[ -z "${opts}" ] && opts=${dhcp}
98
	[ -z "${opts}" ] && opts=${dhcp}
92
	case " ${opts} " in
99
	case " ${opts} " in
93
		*" release "*) dhcpcd -k "${args}" "${IFACE}" ;;
100
		*" release "*)
94
		*) dhcpcd -x "${args}" "${IFACE}" ;;
101
			printf '%s %s' "${args}" "${IFACE}" | xargs -E '' dhcpcd -k
102
			;;
103
		*)
104
			printf '%s %s' "${args}" "${IFACE}" | xargs -E '' dhcpcd -x
105
			;;
95
	esac
106
	esac
96
	[ -f "${argsfile}" ] && rm -f "${argsfile}"
107
	[ -f "${argsfile}" ] && rm -f "${argsfile}"
97
	eend $?
108
	eend $?

Return to bug 907185