Fixes #5824: Make rudder-agent more generic