We have `udev.eclass` which provides all the functions you are reinventing here :).