openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
420 stars 235 forks source link

[pd] pd daemon service: remove redundant subprocess 'sudo' in python script #2595

Closed yangsong-cnyn closed 1 week ago

yangsong-cnyn commented 1 week ago

Removes unnecessary sudo commands from dhcp6_pd_daemon.py.

The script was already running as root due to the User=root setting in the systemd service file. The internal sudo calls were redundant and caused issues with dbus context switching, preventing the script from receiving dbus signals correctly. This change removes the sudo calls, ensuring the script operates within a consistent dbus context and resolves the signal handling problems.

This commit addresses the issue where the dhcp6_pd_daemon was not responding to changes in the Dhcp6PdState dbus property.