Advertisement
silver2row

Um...Clueless in Montreal!

Jun 3rd, 2024
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.67 KB | None | 0 0
  1. SUBSYSTEM=="subsystem", KERNEL=="gpio", ACTION=="add", \
  2.         RUN+="/bin/mkdir -p /dev/gpio"
  3.  
  4. SUBSYSTEM=="gpio", ACTION=="add", TEST=="value", ATTR{label}!="sysfs", \
  5.         RUN+="/bin/ln -sT '/sys/class/gpio/%k' /dev/gpio/%s{label}"
  6.  
  7. #
  8. # ReWritten by: Matthijs van Duin and fiddled with by Seth
  9. # Corrects sys GPIO permissions on the BB so non-root users in the gpio group can manipulate bits
  10. #
  11. SUBSYSTEM=="gpio", ACTION=="add", \
  12.         RUN+="/bin/chgrp -R gpio '/sys%p'", \
  13.         RUN+="/bin/chmod -R g=u '/sys%p'"
  14.  
  15. SUBSYSTEM=="subsystem", KERNEL=="gpio", ACTION=="add", \
  16.         RUN+="/bin/chgrp gpio '/dev/gpio/'", \
  17.         RUN+="/bin/chmod g=u '/dev/gpio/'"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement