Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problems with dhcpcd



 ---- On Mon, 09 Oct 2023 12:41:30 +0100  Roy Marples  wrote --- 
 >  ---- On Mon, 09 Oct 2023 11:33:16 +0100  Roy Marples  wrote --- 
 >  >  ---- On Sun, 08 Oct 2023 21:58:54 +0100  Lloyd Parkes  wrote --- 
 >  >  > 
 >  >  > 
 >  >  > On 8/10/23 15:30, Lloyd Parkes wrote:
 >  >  > I found the problem. The syslog function in /libexec/dhcpcd-run-hooks 
 >  >  > tries to echo text to stdout/stderr and the shell script gets killed 
 >  >  > with SIGPIPE when it's being run in the background.
 >  >  > 
 >  >  > Commenting out the lines
 >  >  > 
 >  >  >          case "$lvl" in
 >  >  >          err|error)      echo "$interface: $*" >&2;;
 >  >  >          *)              echo "$interface: $*";;
 >  >  >          esac
 >  >  > 
 >  >  > allows the script to run correctly.
 >  >  > 
 >  >  > Adding the command 'trap "" PIPE' to /libexec/dhcpcd-run-hooks is 
 >  >  > another way that allows the script to run correctly.
 >  > 
 >  > That's interesting. So I'm looking at two bugs here then
 >  > 1) Why is SIGPIPE being raised in the first place
 >  > 2) Why is it not being captured as an error and logged by dhcpcd.
 >  > 
 >  > As best I can tell, even forcing stdout and stderr to /dev/null doesn't help here.
 >  > What else could this be?
 > 
 > 2) is fixed by this patch.
 > Now dhcpcd correctly reports a broken pipe from running the script.
 
I've just landed dhcpcd-10.0.4 into -current and pkgsrc which fixes this issue.
Sorry for the delay.
Let me know if it works for you!

Roy


Home | Main Index | Thread Index | Old Index