mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
dhcpd6 prefixes script can fail to restart (#8109)
* redirect sleep output to avoid it holding the pipe to daemon process open * add comment explaining the sleep * use daemon -m0 parameter to prevent restart failures This was changed from a simple redirect of the sleep command after discussion with Franco on https://github.com/opnsense/core/pull/8109
This commit is contained in:
parent
4836083503
commit
b962ccd3ed
@ -1583,7 +1583,11 @@ EOD;
|
||||
|
||||
if (count($dhcpdv6ifs) > 0) {
|
||||
mwexec('/usr/local/sbin/dhcpd -6 -user dhcpd -group dhcpd -chroot /var/dhcpd -cf /etc/dhcpdv6.conf -pf /var/run/dhcpdv6.pid ' . join(' ', $dhcpdv6ifs));
|
||||
mwexecf('/usr/sbin/daemon -f -p %s %s', ['/var/run/dhcpleases6.pid', '/usr/local/opnsense/scripts/dhcp/prefixes.sh']);
|
||||
|
||||
# The -m0 parameter prevents the script keeping a pipe connection open
|
||||
# to the daemon parent process, which can cause restart failures, due to
|
||||
# the sleep process running for longer than the shell script.
|
||||
mwexecf('/usr/sbin/daemon -m0 -f -p %s %s', ['/var/run/dhcpleases6.pid', '/usr/local/opnsense/scripts/dhcp/prefixes.sh']);
|
||||
}
|
||||
|
||||
service_log("done.\n", $verbose);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user