qed: Revisit chain implementation
[linux/fpc-iii.git] / scripts / ver_linux
blob0d8bd29b1bd6fe5cfc61dc7c245ecee70420458a
1 #!/bin/sh
2 # Before running this script please ensure that your PATH is
3 # typical as you use for compilation/installation. 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.'
9 echo ' '
11 uname -a
12 echo ' '
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))
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))
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))
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)
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))
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))
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))
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))
70 fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \
71 'NR==1{print "reiser4progs ", $2}'
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))
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))
87 cardmgr -V 2>&1| grep version | awk \
88 'NR==1{print "pcmcia-cs ", $3}'
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))
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))
104 isdnctrl 2>&1 | grep version | awk \
105 'NR==1{print "isdn4k-utils ", $NF}'
107 showmount --version 2>&1 | grep nfs-utils | awk \
108 'NR==1{print "nfs-utils ", $NF}'
110 test -r /proc/self/maps &&
111 sed '
112 /.*libc-\(.*\)\.so$/!d
113 s//Linux C Library\t\t\1/
115 ' /proc/self/maps
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))
124 libcpp=`ldconfig -p 2>/dev/null |
125 awk '/(libg|stdc)[+]+\.so/ {
126 print $NF
127 exit
130 test -r "$libcpp" &&
131 ls -l $libcpp |
132 sed '
133 s!.*so\.!!
134 s!^!Linux C++ Library\t!
136 ps --version 2>&1 |
137 awk '/version/{
138 match($0, /[0-9]+([.]?[0-9]+)+/)
139 printf("Procps\t\t\t%s\n",
140 substr($0,RSTART,RLENGTH))
143 ifconfig --version 2>&1 |
144 awk '/tools/{
145 match($0, /[0-9]+([.]?[0-9]+)+/)
146 printf("Net-tools\t\t%s\n",
147 substr($0,RSTART,RLENGTH))
150 loadkeys -V 2>&1 |
151 awk '/[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)
157 oprofiled --version 2>&1 | awk \
158 '(NR==1 && ($2 == "oprofile")) {print "oprofile ", $3}'
160 expr --v 2>&1 |
161 awk '/^expr/{
162 match($0, /[0-9]+([.]?[0-9]+)+/)
163 printf("Sh-utils\t\t%s\n",
164 substr($0,RSTART,RLENGTH))
167 udevadm --version 2>&1 |
168 awk '/[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))
174 iwconfig --version 2>&1 |
175 awk '/version/{
176 match($0, /[0-9]+([.]?[0-9]+)+/)
177 printf("Wireless-tools\t\t%s\n",
178 substr($0,RSTART,RLENGTH))
181 test -e /proc/modules &&
182 sort /proc/modules |
183 sed '
184 s/ .*//
188 s/^\n/Modules Loaded\t\t/
189 y/\n/ /