blob: 31c0e4d09ffc7b5a20d3df6ddb26d79eca96fa87 [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
Jesper Juhlcc9eefd2007-08-02 01:21:15 +020028echo "binutils $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')"
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Alexey Dobriyan580b2e32005-09-06 15:17:43 -070030echo -n "util-linux "
31fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
Alexey Dobriyan580b2e32005-09-06 15:17:43 -070033echo -n "mount "
34mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$//
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
36depmod -V 2>&1 | awk 'NR==1 {print "module-init-tools ",$NF}'
37
38tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \
39'NR==1 {print "e2fsprogs ", $2}'
40
41fsck.jfs -V 2>&1 | grep version | sed 's/,//' | awk \
42'NR==1 {print "jfsutils ", $3}'
43
Alexey Dobriyanea88df92005-09-21 21:37:24 +040044reiserfsck -V 2>&1 | grep ^reiserfsck | awk \
Linus Torvalds1da177e2005-04-16 15:20:36 -070045'NR==1{print "reiserfsprogs ", $2}'
46
Alexey Dobriyanea88df92005-09-21 21:37:24 +040047fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \
Linus Torvalds1da177e2005-04-16 15:20:36 -070048'NR==1{print "reiser4progs ", $2}'
49
50xfs_db -V 2>&1 | grep version | awk \
51'NR==1{print "xfsprogs ", $3}'
52
Valdis Kletnieks319e7992006-12-06 20:37:43 -080053pccardctl -V 2>&1| grep pcmciautils | awk '{print "pcmciautils ", $2}'
54
Linus Torvalds1da177e2005-04-16 15:20:36 -070055cardmgr -V 2>&1| grep version | awk \
56'NR==1{print "pcmcia-cs ", $3}'
57
58quota -V 2>&1 | grep version | awk \
59'NR==1{print "quota-tools ", $NF}'
60
61pppd --version 2>&1| grep version | awk \
62'NR==1{print "PPP ", $3}'
63
64isdnctrl 2>&1 | grep version | awk \
65'NR==1{print "isdn4k-utils ", $NF}'
66
67showmount --version 2>&1 | grep nfs-utils | awk \
68'NR==1{print "nfs-utils ", $NF}'
69
Jesper Juhl9cc3ef32007-08-22 03:11:56 +020070echo -n "Linux C Library "
71sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
Linus Torvalds1da177e2005-04-16 15:20:36 -070072
73ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
74'NR==1{print "Dynamic linker (ldd) ", $NF}'
75
dann frazierbdefe352009-06-05 15:02:49 -070076ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \
Linus Torvalds1da177e2005-04-16 15:20:36 -070077 '{print "Linux C++ Library " $4"."$5"."$6}'
78
79ps --version 2>&1 | grep version | awk \
80'NR==1{print "Procps ", $NF}'
81
82ifconfig --version 2>&1 | grep tools | awk \
83'NR==1{print "Net-tools ", $NF}'
84
85# Kbd needs 'loadkeys -h',
86loadkeys -h 2>&1 | awk \
87'(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
88
89# while console-tools needs 'loadkeys -V'.
90loadkeys -V 2>&1 | awk \
91'(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}'
92
Valdis Kletnieks319e7992006-12-06 20:37:43 -080093oprofiled --version 2>&1 | awk \
94'(NR==1 && ($2 == "oprofile")) {print "oprofile ", $3}'
95
Linus Torvalds1da177e2005-04-16 15:20:36 -070096expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}'
97
Steven Cole16941452005-04-18 21:57:33 -070098udevinfo -V 2>&1 | grep version | awk '{print "udev ", $3}'
Linus Torvalds1da177e2005-04-16 15:20:36 -070099
Valdis Kletnieks319e7992006-12-06 20:37:43 -0800100iwconfig --version 2>&1 | awk \
101'(NR==1 && ($3 == "version")) {print "wireless-tools ",$4}'
102
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103if [ -e /proc/modules ]; then
104 X=`cat /proc/modules | sed -e "s/ .*$//"`
105 echo "Modules Loaded "$X
106fi