| … | |
… | |
| 137 | ebegin "Running dhclient" |
137 | ebegin "Running dhclient" |
| 138 | |
138 | |
| 139 | # Stop dhclient if it's already running |
139 | # Stop dhclient if it's already running |
| 140 | dhclient_stop "${iface}" |
140 | dhclient_stop "${iface}" |
| 141 | |
141 | |
| 142 | if [[ ${background} == "yes" ]]; then |
|
|
| 143 | eval dhclient "${opts}" -pf "${pidfile}" -q \ |
|
|
| 144 | -sf "${MODULES_DIR}/helpers.d/dhclient-wrapper" \ |
|
|
| 145 | "${iface}" &>/dev/null & |
|
|
| 146 | eend 0 |
|
|
| 147 | go_background |
|
|
| 148 | fi |
|
|
| 149 | |
|
|
| 150 | local x=$( eval dhclient "${opts}" -1 -pf "${pidfile}" \ |
142 | local x=$( eval dhclient "${opts}" -1 -pf "${pidfile}" \ |
| 151 | -sf "${MODULES_DIR}/helpers.d/dhclient-wrapper" -q "${iface}" 2>&1 ) |
143 | -sf "${MODULES_DIR}/helpers.d/dhclient-wrapper" -q "${iface}" 2>&1 ) |
| 152 | # We just check the last 5 letters |
144 | # We just check the last 5 letters |
| 153 | [[ ${x:${#x} - 5:5} == "bound" ]] |
145 | [[ ${x:${#x} - 5:5} == "bound" ]] |
| 154 | if [[ $? != "0" ]]; then |
146 | if [[ $? != "0" ]]; then |