jcnelson / vdev

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

udev rules to vdev ACLs compiler #4

Open jcnelson opened 9 years ago

jcnelson commented 9 years ago

Create and document a script that compiles udev rules into vdev ACL definitions.

GravisZro commented 9 years ago

do you mean you just need a udev rule parser or is there a specific format to convert them to?

jcnelson commented 9 years ago

I need a way to translate a udev rules file into one or more vdev-specific files, to ease migrating from udev to vdev. At the time of this writing (and I apologize that this is currently undocumented), vdev uses ini-style files to describe ACLs to apply and actions to take when a device appears or disappears. They're completely different from udev rules files.

As much as I would have liked to, I couldn't use udev's rules format for vdev because:

GravisZro commented 9 years ago

ok... while i didnt actually make it write out to an ini format (not sure exactly how you want it), i did make a udev rules file parser from scratch. it should be easy to make it do what you like, the default behavior just prints the rules after they are parsed. here: http://adaptivetime.com/udev_parser.tar.gz do whatever you like with it.

jcnelson commented 9 years ago

Hey, this is great! Thank you so much! I can definitely use this as a starting point for converter tool.

In the quite likely event that your code gets incorporated into a tool in the master branch, can you please let me know:

Thanks!

GravisZro commented 9 years ago

the ISC license is fine and sure, just list me as "Gravis". i've been working on a wikicode parser so this was a cakewalk. :)