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 | |
Alexander Kapshuk | 12b2732 | 2015-10-12 21:39:44 +0300 | [diff] [blame] | 35 | mount --version 2>&1 | |
| 36 | awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{ |
| 37 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 38 | $0 = substr($0,RSTART,RLENGTH) |
| 39 | printf("Util-linux\t\t%s\nMount\t\t\t%s\n",$0,$0) |
| 40 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | |
Alexander Kapshuk | 5bcb2f5 | 2015-10-12 21:39:45 +0300 | [diff] [blame] | 42 | depmod -V 2>&1 | |
| 43 | awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{ |
| 44 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 45 | printf("Module-init-tools\t%s\n", |
| 46 | substr($0,RSTART,RLENGTH)) |
| 47 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | |
Alexander Kapshuk | a878222 | 2015-10-12 21:39:46 +0300 | [diff] [blame] | 49 | tune2fs 2>&1 | |
| 50 | awk '/^tune2fs/{ |
| 51 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 52 | printf("E2fsprogs\t\t%s\n", |
| 53 | substr($0,RSTART,RLENGTH)) |
| 54 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
Alexander Kapshuk | 0fc8de5 | 2015-10-12 21:39:47 +0300 | [diff] [blame] | 56 | fsck.jfs -V 2>&1 | |
| 57 | awk '/version/{ |
| 58 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 59 | printf("Jfsutils\t\t%s\n", |
| 60 | substr($0,RSTART,RLENGTH)) |
| 61 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | |
Alexander Kapshuk | 63e781a | 2015-10-12 21:39:48 +0300 | [diff] [blame] | 63 | reiserfsck -V 2>&1 | |
| 64 | awk '/^reiserfsck/{ |
| 65 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 66 | printf("Reiserfsprogs\t\t%s\n", |
| 67 | substr($0,RSTART,RLENGTH)) |
| 68 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | |
Alexey Dobriyan | ea88df9 | 2005-09-21 21:37:24 +0400 | [diff] [blame] | 70 | fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | 'NR==1{print "reiser4progs ", $2}' |
| 72 | |
Alexander Kapshuk | 44422f3 | 2015-10-12 21:39:49 +0300 | [diff] [blame] | 73 | xfs_db -V 2>&1 | |
| 74 | awk '/version/{ |
| 75 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 76 | printf("Xfsprogs\t\t%s\n", |
| 77 | substr($0,RSTART,RLENGTH)) |
| 78 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | |
Alexander Kapshuk | f437d1e | 2015-10-12 21:39:50 +0300 | [diff] [blame] | 80 | pccardctl -V 2>&1 | |
| 81 | awk '/pcmciautils/{ |
| 82 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 83 | printf("Pcmciautils\t\t%s\n", |
| 84 | substr($0,RSTART,RLENGTH)) |
| 85 | }' |
Valdis Kletnieks | 319e799 | 2006-12-06 20:37:43 -0800 | [diff] [blame] | 86 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | cardmgr -V 2>&1| grep version | awk \ |
| 88 | 'NR==1{print "pcmcia-cs ", $3}' |
| 89 | |
Alexander Kapshuk | 8fb0959 | 2015-10-12 21:39:51 +0300 | [diff] [blame] | 90 | quota -V 2>&1 | |
| 91 | awk '/version/{ |
| 92 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 93 | printf("Quota-tools\t\t%s\n", |
| 94 | substr($0,RSTART,RLENGTH)) |
| 95 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | |
Alexander Kapshuk | b903fa9 | 2015-10-12 21:39:52 +0300 | [diff] [blame] | 97 | pppd --version 2>&1 | |
| 98 | awk '/version/{ |
| 99 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 100 | printf("PPP\t\t\t%s\n", |
| 101 | substr($0,RSTART,RLENGTH)) |
| 102 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | |
| 104 | isdnctrl 2>&1 | grep version | awk \ |
| 105 | 'NR==1{print "isdn4k-utils ", $NF}' |
| 106 | |
| 107 | showmount --version 2>&1 | grep nfs-utils | awk \ |
| 108 | 'NR==1{print "nfs-utils ", $NF}' |
| 109 | |
Alexander Kapshuk | cbb57d1 | 2015-10-12 21:39:53 +0300 | [diff] [blame] | 110 | test -r /proc/self/maps && |
| 111 | sed ' |
| 112 | /.*libc-\(.*\)\.so$/!d |
| 113 | s//Linux C Library\t\t\1/ |
| 114 | q |
| 115 | ' /proc/self/maps |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | |
Alexander Kapshuk | 1e5f739 | 2015-10-12 21:39:54 +0300 | [diff] [blame^] | 117 | ldd --version 2>&1 | |
| 118 | awk '/^ldd/{ |
| 119 | match($0, /[0-9]+([.]?[0-9]+)+/) |
| 120 | printf("Dynamic linker (ldd)\t%s\n", |
| 121 | substr($0,RSTART,RLENGTH)) |
| 122 | }' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | |
dann frazier | bdefe35 | 2009-06-05 15:02:49 -0700 | [diff] [blame] | 124 | 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] | 125 | '{print "Linux C++ Library " $4"."$5"."$6}' |
| 126 | |
| 127 | ps --version 2>&1 | grep version | awk \ |
| 128 | 'NR==1{print "Procps ", $NF}' |
| 129 | |
| 130 | ifconfig --version 2>&1 | grep tools | awk \ |
| 131 | 'NR==1{print "Net-tools ", $NF}' |
| 132 | |
| 133 | # Kbd needs 'loadkeys -h', |
| 134 | loadkeys -h 2>&1 | awk \ |
| 135 | '(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}' |
| 136 | |
| 137 | # while console-tools needs 'loadkeys -V'. |
| 138 | loadkeys -V 2>&1 | awk \ |
| 139 | '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}' |
| 140 | |
Valdis Kletnieks | 319e799 | 2006-12-06 20:37:43 -0800 | [diff] [blame] | 141 | oprofiled --version 2>&1 | awk \ |
| 142 | '(NR==1 && ($2 == "oprofile")) {print "oprofile ", $3}' |
| 143 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}' |
| 145 | |
Steven Cole | 1694145 | 2005-04-18 21:57:33 -0700 | [diff] [blame] | 146 | udevinfo -V 2>&1 | grep version | awk '{print "udev ", $3}' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | |
Valdis Kletnieks | 319e799 | 2006-12-06 20:37:43 -0800 | [diff] [blame] | 148 | iwconfig --version 2>&1 | awk \ |
| 149 | '(NR==1 && ($3 == "version")) {print "wireless-tools ",$4}' |
| 150 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | if [ -e /proc/modules ]; then |
| 152 | X=`cat /proc/modules | sed -e "s/ .*$//"` |
| 153 | echo "Modules Loaded "$X |
| 154 | fi |