the stuff

heads-lkm-compile 475B

1234567891011121314151617181920
  1. #!/bin/sh
  2. #
  3. # Copyright (c) Ivan J. <parazyd@dyne.org>
  4. # See LICENSE file for copyright and license details.
  5. #
  6. # compile our custom linux kernel modules
  7. compile_permakey() {
  8. cd /usr/src/permakey
  9. eval "$(cat usbdev | xargs udevadm info grep -E 'ID_VENDOR_ID|ID_MODEL_ID' | cut -d' ' -f2)"
  10. sed -i config.h -e "s/1234/$ID_VENDOR_ID/" -e "s/5678/$ID_MODEL_ID/"
  11. make 2>&1 >/dev/null && insmod permakey.ko
  12. }
  13. grep -q 'nopermakey' /proc/cmdline || compile_permakey
  14. return 0