blob: 0d8bd29b1bd6fe5cfc61dc7c245ecee70420458a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/sh
2# Before running this script please ensure that your PATH is
Matthias Lange9d403a92016-01-29 13:27:56 +01003# typical as you use for compilation/installation. I use
Linus Torvalds1da177e2005-04-16 15:20:36 -07004# /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
5# differ on your system.
6#
Linus Torvalds1da177e2005-04-16 15:20:36 -07007echo 'If some fields are empty or look unusual you may have an old version.'
8echo 'Compare to the current minimal requirements in Documentation/Changes.'
9echo ' '
10
11uname -a
12echo ' '
13
Alexander Kapshuk235024e2015-10-12 21:39:41 +030014gcc -dumpversion 2>&1 |
15awk '/[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 Torvalds1da177e2005-04-16 15:20:36 -070020
Alexander Kapshuk1d60b872015-10-12 21:39:42 +030021make --version 2>&1 |
22awk '/GNU Make/{
23 match($0, /[0-9]+([.]?[0-9]+)+/)
24 printf("GNU Make\t\t%s\n",
25 substr($0,RSTART,RLENGTH))
26}'
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Alexander Kapshuk3e2f5cf2015-10-12 21:39:43 +030028ld -v 2>&1 |
29awk '/[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 Torvalds1da177e2005-04-16 15:20:36 -070034
Alexander Kapshuk12b27322015-10-12 21:39:44 +030035mount --version 2>&1 |
36awk '/[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 Torvalds1da177e2005-04-16 15:20:36 -070041
Alexander Kapshuk5bcb2f52015-10-12 21:39:45 +030042depmod -V 2>&1 |
43awk '/[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 Torvalds1da177e2005-04-16 15:20:36 -070048
Alexander Kapshuka8782222015-10-12 21:39:46 +030049tune2fs 2>&1 |
50awk '/^tune2fs/{
51 match($0, /[0-9]+([.]?[0-9]+)+/)
52 printf("E2fsprogs\t\t%s\n",
53 substr($0,RSTART,RLENGTH))
54}'
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Alexander Kapshuk0fc8de52015-10-12 21:39:47 +030056fsck.jfs -V 2>&1 |
57awk '/version/{
58 match($0, /[0-9]+([.]?[0-9]+)+/)
59 printf("Jfsutils\t\t%s\n",
60 substr($0,RSTART,RLENGTH))
61}'
Linus Torvalds1da177e2005-04-16 15:20:36 -070062
Alexander Kapshuk63e781a2015-10-12 21:39:48 +030063reiserfsck -V 2>&1 |
64awk '/^reiserfsck/{
65 match($0, /[0-9]+([.]?[0-9]+)+/)
66 printf("Reiserfsprogs\t\t%s\n",
67 substr($0,RSTART,RLENGTH))
68}'
Linus Torvalds1da177e2005-04-16 15:20:36 -070069
Alexey Dobriyanea88df92005-09-21 21:37:24 +040070fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \
Linus Torvalds1da177e2005-04-16 15:20:36 -070071'NR==1{print "reiser4progs ", $2}'
72
Alexander Kapshuk44422f32015-10-12 21:39:49 +030073xfs_db -V 2>&1 |
74awk '/version/{
75 match($0, /[0-9]+([.]?[0-9]+)+/)
76 printf("Xfsprogs\t\t%s\n",
77 substr($0,RSTART,RLENGTH))
78}'
Linus Torvalds1da177e2005-04-16 15:20:36 -070079
Alexander Kapshukf437d1e2015-10-12 21:39:50 +030080pccardctl -V 2>&1 |
81awk '/pcmciautils/{
82 match($0, /[0-9]+([.]?[0-9]+)+/)
83 printf("Pcmciautils\t\t%s\n",
84 substr($0,RSTART,RLENGTH))
85}'
Valdis Kletnieks319e7992006-12-06 20:37:43 -080086
Linus Torvalds1da177e2005-04-16 15:20:36 -070087cardmgr -V 2>&1| grep version | awk \
88'NR==1{print "pcmcia-cs ", $3}'
89
Alexander Kapshuk8fb09592015-10-12 21:39:51 +030090quota -V 2>&1 |
91awk '/version/{
92 match($0, /[0-9]+([.]?[0-9]+)+/)
93 printf("Quota-tools\t\t%s\n",
94 substr($0,RSTART,RLENGTH))
95}'
Linus Torvalds1da177e2005-04-16 15:20:36 -070096
Alexander Kapshukb903fa92015-10-12 21:39:52 +030097pppd --version 2>&1 |
98awk '/version/{
99 match($0, /[0-9]+([.]?[0-9]+)+/)
100 printf("PPP\t\t\t%s\n",
101 substr($0,RSTART,RLENGTH))
102}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103
104isdnctrl 2>&1 | grep version | awk \
105'NR==1{print "isdn4k-utils ", $NF}'
106
107showmount --version 2>&1 | grep nfs-utils | awk \
108'NR==1{print "nfs-utils ", $NF}'
109
Alexander Kapshukcbb57d12015-10-12 21:39:53 +0300110test -r /proc/self/maps &&
111sed '
112 /.*libc-\(.*\)\.so$/!d
113 s//Linux C Library\t\t\1/
114 q
115' /proc/self/maps
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116
Alexander Kapshuk1e5f7392015-10-12 21:39:54 +0300117ldd --version 2>&1 |
118awk '/^ldd/{
119 match($0, /[0-9]+([.]?[0-9]+)+/)
120 printf("Dynamic linker (ldd)\t%s\n",
121 substr($0,RSTART,RLENGTH))
122}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123
Alexander Kapshuk53494ba2015-10-12 21:39:55 +0300124libcpp=`ldconfig -p 2>/dev/null |
125 awk '/(libg|stdc)[+]+\.so/ {
126 print $NF
127 exit
128 }
129'`
130test -r "$libcpp" &&
131ls -l $libcpp |
132sed '
133 s!.*so\.!!
134 s!^!Linux C++ Library\t!
135'
Alexander Kapshuke7230872015-10-12 21:39:56 +0300136ps --version 2>&1 |
137awk '/version/{
138 match($0, /[0-9]+([.]?[0-9]+)+/)
139 printf("Procps\t\t\t%s\n",
140 substr($0,RSTART,RLENGTH))
141}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142
Alexander Kapshukbe6bb512015-10-12 21:39:57 +0300143ifconfig --version 2>&1 |
144awk '/tools/{
145 match($0, /[0-9]+([.]?[0-9]+)+/)
146 printf("Net-tools\t\t%s\n",
147 substr($0,RSTART,RLENGTH))
148}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149
Alexander Kapshuk7a343232015-10-12 21:39:58 +0300150loadkeys -V 2>&1 |
151awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
152 match($0, /[0-9]+([.]?[0-9]+)+/)
153 $0 = substr($0,RSTART,RLENGTH)
154 printf("Kbd\t\t\t%s\nConsole-tools\t\t%s\n",$0,$0)
155}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700156
Valdis Kletnieks319e7992006-12-06 20:37:43 -0800157oprofiled --version 2>&1 | awk \
158'(NR==1 && ($2 == "oprofile")) {print "oprofile ", $3}'
159
Alexander Kapshuk29dfecf2015-10-12 21:39:59 +0300160expr --v 2>&1 |
161awk '/^expr/{
162 match($0, /[0-9]+([.]?[0-9]+)+/)
163 printf("Sh-utils\t\t%s\n",
164 substr($0,RSTART,RLENGTH))
165}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166
Alexander Kapshuk1245b7e2015-10-12 21:40:00 +0300167udevadm --version 2>&1 |
168awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
169 match($0, /[0-9]+([.]?[0-9]+)+/)
170 printf("Udev\t\t\t%s\n",
171 substr($0,RSTART,RLENGTH))
172}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173
Alexander Kapshuk031c1552015-10-12 21:40:01 +0300174iwconfig --version 2>&1 |
175awk '/version/{
176 match($0, /[0-9]+([.]?[0-9]+)+/)
177 printf("Wireless-tools\t\t%s\n",
178 substr($0,RSTART,RLENGTH))
179}'
Valdis Kletnieks319e7992006-12-06 20:37:43 -0800180
Alexander Kapshuk1920c292015-10-12 21:40:02 +0300181test -e /proc/modules &&
182sort /proc/modules |
183sed '
184 s/ .*//
185 H
186${
187 g
188 s/^\n/Modules Loaded\t\t/
189 y/\n/ /
190 q
191}
192 d
193'