and the final script + udev rules