ot-br-posix
ot-br-posix copied to clipboard
[otbr-agent] Failed to start on Ubuntu 18.04
Describe the bug A clear and concise description of what the bug is.
otbr-agent fails to start on Ubuntu 18.04 with the following log:
ot-br systemd[1]: /lib/systemd/system/otbr-agent.service:9: Executable path is not absolute: service mdns start
To Reproduce Information to reproduce the behavior, including:
- Git commit id:
31d6b7b82f3ce31a3eedb44e4d89689c15b27198
- IEEE 802.15.4 hardware platform:
nRF52840-DK RCP
- Build steps: Refer to OpenThread Border Router Build and Configuration
Solution
Modify the original /lib/systemd/system/otbr-agent.service
:
[Unit]
Description=OpenThread Border Router Agent
ConditionPathExists=/usr/sbin/otbr-agent
Requires=dbus.socket
After=dbus.socket
[Service]
EnvironmentFile=-/etc/default/otbr-agent
ExecStartPre=service mdns start
ExecStart=/usr/sbin/otbr-agent $OTBR_AGENT_OPTS
KillMode=mixed
Restart=on-failure
RestartSec=5
RestartPreventExitStatus=SIGKILL
[Install]
WantedBy=multi-user.target
Alias=otbr-agent.service
to:
[Unit]
Description=OpenThread Border Router Agent
ConditionPathExists=/usr/sbin/otbr-agent
Requires=dbus.socket mdns.service
After=dbus.socket mdns.service
[Service]
EnvironmentFile=-/etc/default/otbr-agent
ExecStart=/usr/sbin/otbr-agent $OTBR_AGENT_OPTS
KillMode=mixed
Restart=on-failure
RestartSec=5
RestartPreventExitStatus=SIGKILL
[Install]
WantedBy=multi-user.target
Alias=otbr-agent.service