Closed XECDesign closed 2 years ago
@pelwell, this seems to work in my testing. Are there any potential problems with this I might have not thought about?
It works for me as well. I didn't know you can use devices in that way.
Thanks. Looks like on pi-bluetooth upgrade, the /etc/systemd/system/multi-user.target.wants/hciuart.service
symlink is kept in place until the service is disabled and re-enabled. Trying to figure out how to get it to do the right thing before I merge it.
Debhelper is meant to be able to cope with WantedBy
changes, but I haven't made sense of how it's meant to work.
It seems to fall over here.
no_link_installed
parses the new .service
file and if it doesn't find the WantedBy
symlink, returns true. Then create_links
is set to 0
and make_systemd_links
doesn't do anything useful.
I've added a workaround, since I'm not sure whether that's a bug. In my testing it now works as intended, but I'll hold off from pushing it to the public apt repo for now.
Previously, the "After" parameter had no effect, as systemd is not aware of what devices may come up. In some cases, hciattach was running before /dev/serial1 was present. With this change, systemd will only try to load this unit after it is aware of serial1.