Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | # |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | echo 'If some fields are empty or look unusual you may have an old version.' |
| 8 | echo 'Compare to the current minimal requirements in Documentation/Changes.' |
| 9 | echo ' ' |
| 10 | |
| 11 | uname -a |
| 12 | echo ' ' |
| 13 | |
Alexander Kapshuk | 235024e | 2015-10-12 21:39:41 +0300 | [diff] [blame] | 14 | gcc -dumpversion 2>&1 | |
| 15 | awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{ |
| 16 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 17 | printf("GNU C\t\t\t%s\n", |
| 18 | substr($0,RSTART,RLENGTH)) |
| 19 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
Alexander Kapshuk | 1d60b87 | 2015-10-12 21:39:42 +0300 | [diff] [blame] | 21 | make --version 2>&1 | |
| 22 | awk '/GNU Make/{ |
| 23 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 24 | printf("GNU Make\t\t%s\n", |
| 25 | substr($0,RSTART,RLENGTH)) |
| 26 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | |
Alexander Kapshuk | 3e2f5cf | 2015-10-12 21:39:43 +0300 | [diff] [blame^] | 28 | ld -v 2>&1 | |
| 29 | awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{ |
| 30 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 31 | printf("Binutils\t\t%s\n", |
| 32 | substr($0,RSTART,RLENGTH)) |
| 33 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
Alexey Dobriyan | 580b2e3 | 2005-09-06 15:17:43 -0700 | [diff] [blame] | 35 | echo -n "util-linux " |
| 36 | fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$// |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | |
Alexey Dobriyan | 580b2e3 | 2005-09-06 15:17:43 -0700 | [diff] [blame] | 38 | echo -n "mount " |
| 39 | mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$// |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | |
| 41 | depmod -V 2>&1 | awk 'NR==1 {print "module-init-tools ",$NF}' |
| 42 | |
| 43 | tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \ |
| 44 | 'NR==1 {print "e2fsprogs ", $2}' |
| 45 | |
| 46 | fsck.jfs -V 2>&1 | grep version | sed 's/,//' | awk \ |
| 47 | 'NR==1 {print "jfsutils ", $3}' |
| 48 | |
Alexey Dobriyan | ea88df9 | 2005-09-21 21:37:24 +0400 | [diff] [blame] | 49 | reiserfsck -V 2>&1 | grep ^reiserfsck | awk \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | 'NR==1{print "reiserfsprogs ", $2}' |
| 51 | |
Alexey Dobriyan | ea88df9 | 2005-09-21 21:37:24 +0400 | [diff] [blame] | 52 | fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | 'NR==1{print "reiser4progs ", $2}' |
| 54 | |
| 55 | xfs_db -V 2>&1 | grep version | awk \ |
| 56 | 'NR==1{print "xfsprogs ", $3}' |
| 57 | |
Valdis Kletnieks | 319e799 | 2006-12-06 20:37:43 -0800 | [diff] [blame] | 58 | pccardctl -V 2>&1| grep pcmciautils | awk '{print "pcmciautils ", $2}' |
| 59 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | cardmgr -V 2>&1| grep version | awk \ |
| 61 | 'NR==1{print "pcmcia-cs ", $3}' |
| 62 | |
| 63 | quota -V 2>&1 | grep version | awk \ |
| 64 | 'NR==1{print "quota-tools ", $NF}' |
| 65 | |
| 66 | pppd --version 2>&1| grep version | awk \ |
| 67 | 'NR==1{print "PPP ", $3}' |
| 68 | |
| 69 | isdnctrl 2>&1 | grep version | awk \ |
| 70 | 'NR==1{print "isdn4k-utils ", $NF}' |
| 71 | |
| 72 | showmount --version 2>&1 | grep nfs-utils | awk \ |
| 73 | 'NR==1{print "nfs-utils ", $NF}' |
| 74 | |
Jesper Juhl | 9cc3ef3 | 2007-08-22 03:11:56 +0200 | [diff] [blame] | 75 | echo -n "Linux C Library " |
| 76 | sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | |
| 78 | ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \ |
| 79 | 'NR==1{print "Dynamic linker (ldd) ", $NF}' |
| 80 | |
dann frazier | bdefe35 | 2009-06-05 15:02:49 -0700 | [diff] [blame] | 81 | ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | '{print "Linux C++ Library " $4"."$5"."$6}' |
| 83 | |
| 84 | ps --version 2>&1 | grep version | awk \ |
| 85 | 'NR==1{print "Procps ", $NF}' |
| 86 | |
| 87 | ifconfig --version 2>&1 | grep tools | awk \ |
| 88 | 'NR==1{print "Net-tools ", $NF}' |
| 89 | |
| 90 | # Kbd needs 'loadkeys -h', |
| 91 | loadkeys -h 2>&1 | awk \ |
| 92 | '(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}' |
| 93 | |
| 94 | # while console-tools needs 'loadkeys -V'. |
| 95 | loadkeys -V 2>&1 | awk \ |
| 96 | '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}' |
| 97 | |
Valdis Kletnieks | 319e799 | 2006-12-06 20:37:43 -0800 | [diff] [blame] | 98 | oprofiled --version 2>&1 | awk \ |
| 99 | '(NR==1 && ($2 == "oprofile")) {print "oprofile ", $3}' |
| 100 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}' |
| 102 | |
Steven Cole | 1694145 | 2005-04-18 21:57:33 -0700 | [diff] [blame] | 103 | udevinfo -V 2>&1 | grep version | awk '{print "udev ", $3}' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | |
Valdis Kletnieks | 319e799 | 2006-12-06 20:37:43 -0800 | [diff] [blame] | 105 | iwconfig --version 2>&1 | awk \ |
| 106 | '(NR==1 && ($3 == "version")) {print "wireless-tools ",$4}' |
| 107 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 | if [ -e /proc/modules ]; then |
| 109 | X=`cat /proc/modules | sed -e "s/ .*$//"` |
| 110 | echo "Modules Loaded "$X |
| 111 | fi |