jcnelson / vdev

A device-file manager for *nix
GNU General Public License v3.0
101 stars 13 forks source link

Manual invoke #8

Closed aldemira closed 9 years ago

aldemira commented 9 years ago

Is is possible to have an option to run vdev manually? As we've talked on the Devuan mailing list. Vdev runs and populates /dev from sysfs during boot time and exits.

Root can anytime call vdev to patch/update /dev.

Thanks!

jcnelson commented 9 years ago

This should be possible by creating a separate Linux back-end that simply exits once the initial sysfs devices get processed. Thanks for opening this request!

jcnelson commented 9 years ago

It's still lightly tested, but this should be implemented as of commit 47d166eaf68e5e6fd58da5e4a7176493660d9843.

jcnelson commented 9 years ago

Re-opening...forgot to add code that removes unused device nodes across invocations. Shouldn't be too hard, though.

jcnelson commented 9 years ago

Still lightly tested, but this is now implemented in 5fb243fd845da81099fdf28f572b58fafceb721f. All devices that are not in /dev but were added will be added, and all devices that are unplugged will be removed from /dev. This lets you effectively "patch" your /dev, to make it consistent with the state of your computer's hardware.

To use this feature, run vdevd --once.

aldemira commented 9 years ago

Thanks jude. I'm trying to write an init script now. I'll send a pull request when I'm done, and I might have a couple questions on the way.

jcnelson commented 9 years ago

Feel free to email me if you have any questions :)