home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / lib / rpm / find-provides.ksyms < prev    next >
Text File  |  2006-11-29  |  402b  |  21 lines

  1. #! /bin/sh
  2.  
  3. IFS=$'\n'
  4.  
  5. case "$1" in
  6. kernel-module-*)    ;; # Fedora kernel module package names start with
  7.                # kernel-module.
  8. kernel*)        is_kernel_package=1 ;;
  9. esac
  10.  
  11. if ! [ -z "$is_kernel_package" ]; then
  12.     cat > /dev/null
  13.     exit 0
  14. fi
  15.  
  16. for module in $(grep -E '/lib/modules/.+\.ko$'); do
  17.     nm "$module" \
  18.     | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):ksym(\2) = \1:p'
  19. done \
  20. | sort -u
  21.