Skip to content

Commit

Permalink
feat(udev): Apple Superdrive rule (#291)
Browse files Browse the repository at this point in the history
* feat(udev): Apple Superdrive rule

Requires `sg_raw` package to be installed for it to work.

Otherwise, it should just reliably fail & exit.

* docs: Add changelog in RPM spec file

* docs: Add note in README

* docs: Add note about `sg3_utils` package requirement in README

* docs: Add credits to the inventor of this rule in README
  • Loading branch information
fiftydinar authored Jul 14, 2024
1 parent 581c0ed commit 59e80d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Feel free to PR more rules into this repo! Ideally as they get added upstream we
- [Yubikey support](https://github.com/Yubico/libfido2/tree/main/udev)
- [Wooting Wootility](https://wooting.io/wootility)
- Neutron HiFi DAC V1
- Apple SuperDrive (requires `sg3_utils` package to be installed for it to work)

Note: udev rules are placed in `/usr/lib/udev/rules.d/`, it's normal for `/etc/udev/rules.d` to be empty on initial installation.

Expand Down
5 changes: 5 additions & 0 deletions files/etc/udev/rules.d/90-apple-superdrive.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Apple SuperDrive udev rule
# Credits: @yookoala from GitHub
# See: https://gist.github.com/yookoala/818c1ff057e3d965980b7fd3bf8f77a6

ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw %r/sr%n EA 00 00 00 00 00 01"
3 changes: 3 additions & 0 deletions rpmspec/ublue-os-udev-rules.spec
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ cp %{buildroot}%{_datadir}/%{VENDOR}/{%{sub_name}/etc/udev/rules.d,game-devices-


%changelog
* Tue Jun 25 2024 Fifty Dinar <[email protected]> - 0.10
- Add Apple SuperDrive udev rule

* Sun Jun 02 2024 Fifty Dinar <[email protected]> - 0.9
- Add Neutron HiFi DAC V1 udev rule

Expand Down

0 comments on commit 59e80d9

Please sign in to comment.