ver_linux 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #!/bin/sh
  2. # Before running this script please ensure that your PATH is
  3. # typical as you use for compilation/istallation. I use
  4. # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
  5. # differ on your system.
  6. #
  7. PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:$PATH
  8. echo 'If some fields are empty or look unusual you may have an old version.'
  9. echo 'Compare to the current minimal requirements in Documentation/Changes.'
  10. echo ' '
  11. uname -a
  12. echo ' '
  13. gcc --version 2>&1| head -n 1 | grep -v gcc | awk \
  14. 'NR==1{print "Gnu C ", $1}'
  15. gcc --version 2>&1| grep gcc | awk \
  16. 'NR==1{print "Gnu C ", $3}'
  17. make --version 2>&1 | awk -F, '{print $1}' | awk \
  18. '/GNU Make/{print "Gnu make ",$NF}'
  19. ld -v | awk -F\) '{print $1}' | awk \
  20. '/BFD/{print "binutils ",$NF} \
  21. /^GNU/{print "binutils ",$4}'
  22. echo -n "util-linux "
  23. fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
  24. echo -n "mount "
  25. mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$//
  26. depmod -V 2>&1 | awk 'NR==1 {print "module-init-tools ",$NF}'
  27. tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \
  28. 'NR==1 {print "e2fsprogs ", $2}'
  29. fsck.jfs -V 2>&1 | grep version | sed 's/,//' | awk \
  30. 'NR==1 {print "jfsutils ", $3}'
  31. reiserfsck -V 2>&1 | grep reiserfsck | awk \
  32. 'NR==1{print "reiserfsprogs ", $2}'
  33. fsck.reiser4 -V 2>&1 | grep fsck.reiser4 | awk \
  34. 'NR==1{print "reiser4progs ", $2}'
  35. xfs_db -V 2>&1 | grep version | awk \
  36. 'NR==1{print "xfsprogs ", $3}'
  37. cardmgr -V 2>&1| grep version | awk \
  38. 'NR==1{print "pcmcia-cs ", $3}'
  39. quota -V 2>&1 | grep version | awk \
  40. 'NR==1{print "quota-tools ", $NF}'
  41. pppd --version 2>&1| grep version | awk \
  42. 'NR==1{print "PPP ", $3}'
  43. isdnctrl 2>&1 | grep version | awk \
  44. 'NR==1{print "isdn4k-utils ", $NF}'
  45. showmount --version 2>&1 | grep nfs-utils | awk \
  46. 'NR==1{print "nfs-utils ", $NF}'
  47. ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \
  48. -e 's/\.so$//' | awk -F'[.-]' '{print "Linux C Library " \
  49. $(NF-2)"."$(NF-1)"."$NF}'
  50. ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
  51. 'NR==1{print "Dynamic linker (ldd) ", $NF}'
  52. ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \
  53. '{print "Linux C++ Library " $4"."$5"."$6}'
  54. ps --version 2>&1 | grep version | awk \
  55. 'NR==1{print "Procps ", $NF}'
  56. ifconfig --version 2>&1 | grep tools | awk \
  57. 'NR==1{print "Net-tools ", $NF}'
  58. # Kbd needs 'loadkeys -h',
  59. loadkeys -h 2>&1 | awk \
  60. '(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
  61. # while console-tools needs 'loadkeys -V'.
  62. loadkeys -V 2>&1 | awk \
  63. '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}'
  64. expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}'
  65. udevinfo -V 2>&1 | grep version | awk '{print "udev ", $3}'
  66. if [ -e /proc/modules ]; then
  67. X=`cat /proc/modules | sed -e "s/ .*$//"`
  68. echo "Modules Loaded "$X
  69. fi