[systemd-devel] Only run service with network connection

Paul Menzel pmenzel+systemd-devel at molgen.mpg.de
Mon Jan 6 06:08:03 UTC 2025


Dear systemd folks,


fwupd allows to update device firmware, and ships `fwupd-refresh.timer` 
and `fwupd-refresh.service` to refresh the fwupd metadata by downloading 
things over the network, and to update motd.

Currently, if there is no network connecting during this time, the 
service is shown as failed. That downloading the metadata is not 
possible with no network connection is expected in my opinion, so the 
service should not be shown as failed [1]. Do you have a recommendation 
how to deal with this? Should `/usr/bin/fwupdmgr refresh` return a 
special exit code in this case, or should a condition be added? What 
would be used for the condition as different network manager can be used 
like NetworkManager or systemd-networkd.


Kind regards,

Paul


[1]: https://github.com/fwupd/fwupd/issues/8144


More information about the systemd-devel mailing list