Guest User

Untitled

a guest
Jul 7th, 2019
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/helpers/makeudev b/helpers/makeudev
  2. index 671c562..b62537a 100755
  3. --- a/helpers/makeudev
  4. +++ b/helpers/makeudev
  5. @@ -52,7 +52,11 @@ while (<>) {
  6. print "# sys rule\n";
  7. s{^/sys/}{};
  8. my ($dev, $key, $mode, $owner, $group) = split;
  9. - print qq{DEVPATH=="/$dev", RUN+="/bin/chmod $mode /sys/\$devpath/$key", RUN+="/bin/chown $owner:$group /sys/\$devpath/$key"\n} ;
  10. + if ($dev =~ m{^devices/system/cpu/cpu\*}) {
  11. + print qq{DEVPATH=="/$dev", ACTION=="online", TEST=="/sys/\$devpath/$key", RUN+="/bin/chmod $mode /sys/\$devpath/$key", RUN+="/bin/chown $owner:$group /sys/\$devpath/$key"\n} ;
  12. + next;
  13. + }
  14. + print qq{DEVPATH=="/$dev", TEST=="/sys/\$devpath/$key", RUN+="/bin/chmod $mode /sys/\$devpath/$key", RUN+="/bin/chown $owner:$group /sys/\$devpath/$key"\n} ;
  15. next;
  16. }
RAW Paste Data