Current-Users archive

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

Re: Problems with dhcpcd





On 8/10/23 15:30, Lloyd Parkes wrote:
I added some debugging to /libexec/dhcpcd-run-hooks and things started working ... better.

I created an empty file called /var/log/debug and added "exec >> /var/log/debug 2>&1" to the top of /libexec/dhcpcd-run-hooks.

With this change the hostname is reliably set by the time I ssh in to the Raspberry Pi after a reboot...

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.

Cheers,
Lloyd


Home | Main Index | Thread Index | Old Index