blob: a926225e10afdb30ae0c24599456ee25416eb9a2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/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 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
Valdis Kletnieks319e7992006-12-06 20:37:43 -080080pccardctl -V 2>&1| grep pcmciautils | awk '{print "pcmciautils ", $2}'
81
Linus Torvalds1da177e2005-04-16 15:20:36 -070082cardmgr -V 2>&1| grep version | awk \
83'NR==1{print "pcmcia-cs ", $3}'
84
85quota -V 2>&1 | grep version | awk \
86'NR==1{print "quota-tools ", $NF}'
87
88pppd --version 2>&1| grep version | awk \
89'NR==1{print "PPP ", $3}'
90
91isdnctrl 2>&1 | grep version | awk \
92'NR==1{print "isdn4k-utils ", $NF}'
93
94showmount --version 2>&1 | grep nfs-utils | awk \
95'NR==1{print "nfs-utils ", $NF}'
96
Jesper Juhl9cc3ef32007-08-22 03:11:56 +020097echo -n "Linux C Library "
98sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
Linus Torvalds1da177e2005-04-16 15:20:36 -070099
100ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
101'NR==1{print "Dynamic linker (ldd) ", $NF}'
102
dann frazierbdefe352009-06-05 15:02:49 -0700103ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 '{print "Linux C++ Library " $4"."$5"."$6}'
105
106ps --version 2>&1 | grep version | awk \
107'NR==1{print "Procps ", $NF}'
108
109ifconfig --version 2>&1 | grep tools | awk \
110'NR==1{print "Net-tools ", $NF}'
111
112# Kbd needs 'loadkeys -h',
113loadkeys -h 2>&1 | awk \
114'(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
115
116# while console-tools needs 'loadkeys -V'.
117loadkeys -V 2>&1 | awk \
118'(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}'
119
Valdis Kletnieks319e7992006-12-06 20:37:43 -0800120oprofiled --version 2>&1 | awk \
121'(NR==1 && ($2 == "oprofile")) {print "oprofile ", $3}'
122
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}'
124
Steven Cole16941452005-04-18 21:57:33 -0700125udevinfo -V 2>&1 | grep version | awk '{print "udev ", $3}'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126
Valdis Kletnieks319e7992006-12-06 20:37:43 -0800127iwconfig --version 2>&1 | awk \
128'(NR==1 && ($3 == "version")) {print "wireless-tools ",$4}'
129
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130if [ -e /proc/modules ]; then
131 X=`cat /proc/modules | sed -e "s/ .*$//"`
132 echo "Modules Loaded "$X
133fi