I'm currently reviewing postmarketos-ui-sxmo and noticed, that sxmo-utils provides a sxmo-pinephone service:
In order to make this less pinephone specific, I suggest the following refactoring:
/sys/firmware/devicetree/base/compatible(or pinetab? not sure if supported by sxmo), then run the pinephone specific commands you already have
Thanks for the feedback! The sxmo-pinephone service was indeed introduced in 1.3.0 . I agree with your points, having a more generic service would be better and easier for the future. I'll rework this a bit for next release.