-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate rules with Python #5
Conversation
# Nitrokey Storage dev Entry | ||
KERNEL=="sd?1", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4109", SYMLINK+="nitrospace" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to mention – this rule looks somewhat misplaced. I understand it’s for development? Should we just remove it from the official rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szszszsz Any idea, opinion?
This patch adds a Python script to generate the udev rules. The required data is defined in a TOML file. This makes the rules easier to maintain and update. This causes some small changes in the formatting of the rules. Also, the rule for the Nitrokey Storage bootloader is updated to use ATTRS instead of ATTR for consistency with similar rules.
9ca5120
to
922e0f9
Compare
Merged with the unclear Nitrokey Storage rule to keep the status quo. We can still remove it in another PR. |
Hi!
It's a feature actually - this makes a symlink to a first partition of the
connected Nitrokey Storage, regardless of what block device it was assigned
to (so nitrospace -> sda1, if Nitrokey Storage was assigned to sda, sdb1 if
sdb etc.). This way one could always run `mount /dev/nitrospace
/mnt/nitrokey`.
I've never heard anyone is using this one though, so I assume it's safe to
remove (perhaps I was using this internally). Now with the volume/partition
label based mounting this could be a little outdated as well.
Note, that this rule works just for a single device case. It would need to
be corrected for the multiple Nitrokey Storage devices connected.
pon., 16 gru 2024 o 08:27 jans23 ***@***.***> napisał(a):
… ***@***.**** commented on this pull request.
------------------------------
In generate.py
<#5 (comment)>
:
> + # Nitrokey Storage dev Entry
+ KERNEL=="sd?1", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4109", SYMLINK+="nitrospace"
@szszszsz <https://github.com/szszszsz> Any idea, opinion?
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBXW4Q7G545KBCC5EKAKFT2FZ6E7AVCNFSM6AAAAABTTPHZKCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMBVGM2DGNBYHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@szszszsz Thanks for the explanation! Let’s remove it from the general rules then. Users can still add a custom rule based on their setup and device. |
See the discussion in #5.
See the discussion in #5.
This patch adds a Python script to generate the udev rules. The required data is defined in a TOML file. This makes the rules easier to maintain and update.
This causes some small changes in the formatting of the rules. Also, the rule for the Nitrokey Storage bootloader is updated to use ATTRS instead of ATTR for consistency with similar rules.