If one simply does something like syslog info foo bar From a dhcp hook it will actually cause an error to be output (and script terminated): Jul 14 09:10:41 serenity ifplugd(eth0)[1905]: client: /lib/dhcpcd/dhcpcd-run-hooks: line 134: [: uls-dhcp-hook: binary operator expected Looking at the code this is because $@ is used when testing for a non-empty string, in particular: if [ -n "$@" ]; then In the above example this would expand to: if [ -n "foo" "bar" ]; then Which is not legal. I would suggest changing the $@ in that line, as well as two lines down in the actual call to logger to $* which will eliminate the problem. It's easy enough to work around once you realize what the problem is (don't call syslog with more than two parameters), so the above for example needs to change to: syslog info "foo bar" Reproducible: Always
Created attachment 241323 [details] 0001-fix-syslog-function.patch This patch should fix the issue. Roy, can you please apply this to your git? Thanks, William
Roy, I have written a patch that should fix this, see the attachment. Thanks, William
http://roy.marples.name/projects/dhcpcd/changeset/97f75d8691752fee5ec649a80f94d1760e5caa1c
This has been fixed in upstream git. Thanks for the report.