← Commit list

78abf88dc

Denys Vlasenko
Denys Vlasenko
2010-05-02
FAILED Duration: 33s

Subject

ifdown: use /var/run/udhcpc.%iface%.pid only if it exists

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ifupdown.c+4 -2
@@ -573,8 +573,10 @@ static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd, execfn *exec)
static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd, execfn *exec)
{
int result;
- result = execute("kill "
- "`cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
+ result = execute(
+ "test -f /var/run/udhcpc.%iface%.pid && "
+ "kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
+ ifd, exec);
/* Also bring the hardware interface down since
killing the dhcp client alone doesn't do it.
This enables consecutive ifup->ifdown->ifup */