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.
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.'
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))
23 match($0, /[0-9]+([.]?[0-9]+)+/)
24 printf("GNU Make\t\t%s\n",
25 substr($0,RSTART,RLENGTH))
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))
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)
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))
51 match($0, /[0-9]+([.]?[0-9]+)+/)
52 printf("E2fsprogs\t\t%s\n",
53 substr($0,RSTART,RLENGTH))
56 fsck.jfs
-V 2>&1 |
grep version |
sed 's/,//' |
awk \
57 'NR==1 {print "jfsutils ", $3}'
59 reiserfsck
-V 2>&1 |
grep ^reiserfsck |
awk \
60 'NR==1{print "reiserfsprogs ", $2}'
62 fsck.reiser4
-V 2>&1 |
grep ^fsck.reiser4 |
awk \
63 'NR==1{print "reiser4progs ", $2}'
65 xfs_db
-V 2>&1 |
grep version |
awk \
66 'NR==1{print "xfsprogs ", $3}'
68 pccardctl
-V 2>&1|
grep pcmciautils |
awk '{print "pcmciautils ", $2}'
70 cardmgr
-V 2>&1|
grep version |
awk \
71 'NR==1{print "pcmcia-cs ", $3}'
73 quota
-V 2>&1 |
grep version |
awk \
74 'NR==1{print "quota-tools ", $NF}'
76 pppd
--version 2>&1|
grep version |
awk \
77 'NR==1{print "PPP ", $3}'
79 isdnctrl
2>&1 |
grep version |
awk \
80 'NR==1{print "isdn4k-utils ", $NF}'
82 showmount
--version 2>&1 |
grep nfs-utils |
awk \
83 'NR==1{print "nfs-utils ", $NF}'
85 echo -n "Linux C Library "
86 sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc
/self
/maps
88 ldd
-v > /dev
/null
2>&1 && ldd
-v || ldd
--version |
head -n 1 |
awk \
89 'NR==1{print "Dynamic linker (ldd) ", $NF}'
91 ls -l /usr
/lib
/libg
++.so
/usr
/lib
/libstdc
++.so
2>/dev
/null |
awk -F. \
92 '{print "Linux C++ Library " $4"."$5"."$6}'
94 ps
--version 2>&1 |
grep version |
awk \
95 'NR==1{print "Procps ", $NF}'
97 ifconfig
--version 2>&1 |
grep tools |
awk \
98 'NR==1{print "Net-tools ", $NF}'
100 # Kbd needs 'loadkeys -h',
101 loadkeys
-h 2>&1 |
awk \
102 '(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
104 # while console-tools needs 'loadkeys -V'.
105 loadkeys
-V 2>&1 |
awk \
106 '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}'
108 oprofiled
--version 2>&1 |
awk \
109 '(NR==1 && ($2 == "oprofile")) {print "oprofile ", $3}'
111 expr --v 2>&1 |
awk 'NR==1{print "Sh-utils ", $NF}'
113 udevinfo
-V 2>&1 |
grep version |
awk '{print "udev ", $3}'
115 iwconfig
--version 2>&1 |
awk \
116 '(NR==1 && ($3 == "version")) {print "wireless-tools ",$4}'
118 if [ -e /proc
/modules
]; then
119 X
=`cat /proc/modules | sed -e "s/ .*$//"`
120 echo "Modules Loaded "$X
This page took 0.040607 seconds and 6 git commands to generate.