timebertt / pi-cloud-init

Minimal Raspberry Pi OS including cloud-init
Apache License 2.0
89 stars 13 forks source link

Mask DHCPCD service from starting #2

Closed geoff-coppertop closed 3 years ago

geoff-coppertop commented 3 years ago

Fixes #1

DHCPCD and cloud-init both try to control the networking, it's a bad life choice to have two masters...

This solves the problem of getting an unrequested dynamic address, I'm now seeing,

rfkill: cannot open /dev/rfkill: Permission denied
rfkill: cannot read /dev/rfkill: Bad file descriptor

When I login over SSH, which I've isolated to /etc/profile.d/wifi-check.sh checking only that /dev/rfkill has the character attribute. I'm pretty sure that it can be fixed by also checking for write permission so I'm going to see if I can properly stitch that in as well now.

geoff-coppertop commented 3 years ago

Are you seeing the error regarding /dev/rfkill permissions when you connect over ssh? When I look at the permissions it's root:root if I call sudo rfkill the permissions change to root:netdev, which I think is what they should be and then I no longer get the permissions error until I reboot and they revert to root:root.

timebertt commented 3 years ago

Hmm, strange. I haven't seen the rfkill issues. Though, I also haven't tried wifi yet and always connected via cable.