I started writing my comment before you posted your log output. That's why I saw it only afterwards.
I tracked it down to: /usr/lib/dhcpcd/dhcpcd-run-hooks -> /usr/lib/dhcpcd/dhcpcd-hooks/30-hostname -> need_hostname function:
``` is_default_hostname "$hostname" && return 0 ```
/usr/lib/dhcpcd/dhcpcd-hooks/10-mtu calls "set -e" which is still present when sourcing /usr/lib/dhcpcd/dhcpcd-hooks/30-hostname.
Distilled down `test` shell code:
``` #!/bin/sh set -e
need_hostname() { false && return 0 echo "remaining" }
need_hostname ```
busybox behaves differently than dash in that case:
``` $ sh test; echo $? remaining 0 $ busybox test; echo $? 1 ```
I started writing my comment before you posted your log output. That's why I saw it only afterwards.
I tracked it down to: /usr/lib/ dhcpcd/ dhcpcd- run-hooks -> /usr/lib/ dhcpcd/ dhcpcd- hooks/30- hostname -> need_hostname function:
``` hostname "$hostname" && return 0
is_default_
```
/usr/lib/ dhcpcd/ dhcpcd- hooks/10- mtu calls "set -e" which is still present when sourcing /usr/lib/ dhcpcd/ dhcpcd- hooks/30- hostname.
Distilled down `test` shell code:
```
#!/bin/sh
set -e
need_hostname()
{
false && return 0
echo "remaining"
}
need_hostname
```
busybox behaves differently than dash in that case:
```
$ sh test; echo $?
remaining
0
$ busybox test; echo $?
1
```