ot-br-posix icon indicating copy to clipboard operation
ot-br-posix copied to clipboard

[otbr-agent] Failed to start on Ubuntu 18.04

Open dsyx opened this issue 2 years ago • 0 comments

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:

  1. Git commit id: 31d6b7b82f3ce31a3eedb44e4d89689c15b27198
  2. IEEE 802.15.4 hardware platform: nRF52840-DK RCP
  3. 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

dsyx avatar Aug 12 '22 07:08 dsyx