svn commit: r344237 - stable/12/sbin/dhclient
Jilles Tjoelker
jilles at FreeBSD.org
Sun Feb 17 20:25:08 UTC 2019
Author: jilles
Date: Sun Feb 17 20:25:07 2019
New Revision: 344237
URL: https://svnweb.freebsd.org/changeset/base/344237
Log:
MFC r343896,r343922: dhclient: Pass through exit status from script
The wait status is translated into 8 bits the same way as the shell
calculates $?.
Modified:
stable/12/sbin/dhclient/dhclient.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sbin/dhclient/dhclient.c
==============================================================================
--- stable/12/sbin/dhclient/dhclient.c Sun Feb 17 18:32:19 2019 (r344236)
+++ stable/12/sbin/dhclient/dhclient.c Sun Feb 17 20:25:07 2019 (r344237)
@@ -2350,7 +2350,8 @@ priv_script_go(void)
if (ip)
script_flush_env(ip->client);
- return (wstatus & 0xff);
+ return (WIFEXITED(wstatus) ?
+ WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus));
}
void
More information about the svn-src-stable-12
mailing list