Blame view

scripts/ver_linux 3.89 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
  #!/bin/sh
  # Before running this script please ensure that your PATH is
  # typical as you use for compilation/istallation. I use
  # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
  # differ on your system.
  #
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
7
8
9
10
11
12
  echo 'If some fields are empty or look unusual you may have an old version.'
  echo 'Compare to the current minimal requirements in Documentation/Changes.'
  echo ' '
  
  uname -a
  echo ' '
235024e51   Alexander Kapshuk   ver_linux: gcc -d...
13
14
15
16
17
18
19
  gcc -dumpversion 2>&1 |
  awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("GNU C\t\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
20

1d60b873a   Alexander Kapshuk   ver_linux: make -...
21
22
23
24
25
26
27
  make --version 2>&1 |
  awk '/GNU Make/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("GNU Make\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
28

3e2f5cfb3   Alexander Kapshuk   ver_linux: binuti...
29
30
31
32
33
34
35
  ld -v 2>&1 |
  awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Binutils\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
36

12b2732c8   Alexander Kapshuk   ver_linux: util-l...
37
38
39
40
41
42
43
44
  mount --version 2>&1 |
  awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	$0 = substr($0,RSTART,RLENGTH)
  	printf("Util-linux\t\t%s
  Mount\t\t\t%s
  ",$0,$0)
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
45

5bcb2f592   Alexander Kapshuk   ver_linux: module...
46
47
48
49
50
51
52
  depmod -V  2>&1 |
  awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Module-init-tools\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
53

a87822275   Alexander Kapshuk   ver_linux: e2fspr...
54
55
56
57
58
59
60
  tune2fs 2>&1 |
  awk '/^tune2fs/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("E2fsprogs\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
61

0fc8de563   Alexander Kapshuk   ver_linux: jfsuti...
62
63
64
65
66
67
68
  fsck.jfs -V 2>&1 |
  awk '/version/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Jfsutils\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
69

63e781ad2   Alexander Kapshuk   ver_linux: reiser...
70
71
72
73
74
75
76
  reiserfsck -V 2>&1 |
  awk '/^reiserfsck/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Reiserfsprogs\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
77

ea88df9bf   Alexey Dobriyan   ver_linux: don't ...
78
  fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
79
  'NR==1{print "reiser4progs          ", $2}'
44422f3cd   Alexander Kapshuk   ver_linux: xfspro...
80
81
82
83
84
85
86
  xfs_db -V 2>&1 |
  awk '/version/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Xfsprogs\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
87

f437d1ed6   Alexander Kapshuk   ver_linux: pcmcia...
88
89
90
91
92
93
94
  pccardctl -V 2>&1 |
  awk '/pcmciautils/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Pcmciautils\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
319e799ab   Valdis Kletnieks   [PATCH] ver_linux...
95

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
96
97
  cardmgr -V 2>&1| grep version | awk \
  'NR==1{print "pcmcia-cs             ", $3}'
8fb095982   Alexander Kapshuk   ver_linux: quota-...
98
99
100
101
102
103
104
  quota -V 2>&1 |
  awk '/version/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Quota-tools\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
105

b903fa982   Alexander Kapshuk   ver_linux: ppp, l...
106
107
108
109
110
111
112
  pppd --version 2>&1 |
  awk '/version/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("PPP\t\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
113
114
115
116
117
118
  
  isdnctrl 2>&1 | grep version | awk \
  'NR==1{print "isdn4k-utils          ", $NF}'
  
  showmount --version 2>&1 | grep nfs-utils | awk \
  'NR==1{print "nfs-utils             ", $NF}'
cbb57d10a   Alexander Kapshuk   ver_linux: libc, ...
119
120
121
122
123
124
  test -r /proc/self/maps &&
  sed '
  	/.*libc-\(.*\)\.so$/!d
  	s//Linux C Library\t\t\1/
  	q
  ' /proc/self/maps
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
125

1e5f739c6   Alexander Kapshuk   ver_linux: ldd, l...
126
127
128
129
130
131
132
  ldd --version 2>&1 |
  awk '/^ldd/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Dynamic linker (ldd)\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
133

53494ba9d   Alexander Kapshuk   ver_linux: libcpp...
134
135
136
137
138
139
140
141
142
143
144
145
  libcpp=`ldconfig -p 2>/dev/null |
  	awk '/(libg|stdc)[+]+\.so/ {
  	print $NF
  	exit
  	}
  '`
  test -r "$libcpp" &&
  ls -l $libcpp |
  sed '
  	s!.*so\.!!
  	s!^!Linux C++ Library\t!
  '
e7230872c   Alexander Kapshuk   ver_linux: procps...
146
147
148
149
150
151
152
  ps --version 2>&1 |
  awk '/version/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Procps\t\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
153

be6bb51a9   Alexander Kapshuk   ver_linux: net-to...
154
155
156
157
158
159
160
  ifconfig --version 2>&1 |
  awk '/tools/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Net-tools\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
161

7a343234e   Alexander Kapshuk   ver_linux: loadke...
162
163
164
165
166
167
168
169
  loadkeys -V 2>&1 |
  awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	$0 = substr($0,RSTART,RLENGTH)
  	printf("Kbd\t\t\t%s
  Console-tools\t\t%s
  ",$0,$0)
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
170

319e799ab   Valdis Kletnieks   [PATCH] ver_linux...
171
172
  oprofiled --version 2>&1 | awk \
  '(NR==1 && ($2 == "oprofile")) {print "oprofile              ", $3}'
29dfecff1   Alexander Kapshuk   ver_linux: sh-uti...
173
174
175
176
177
178
179
  expr --v 2>&1 |
  awk '/^expr/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Sh-utils\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
180

1245b7ec0   Alexander Kapshuk   ver_linux: use 'u...
181
182
183
184
185
186
187
  udevadm --version 2>&1 |
  awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Udev\t\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
188

031c155a8   Alexander Kapshuk   ver_linux: wirele...
189
190
191
192
193
194
195
  iwconfig --version 2>&1 |
  awk '/version/{
  	match($0, /[0-9]+([.]?[0-9]+)+/)
  	printf("Wireless-tools\t\t%s
  ",
  	substr($0,RSTART,RLENGTH))
  }'
319e799ab   Valdis Kletnieks   [PATCH] ver_linux...
196

1920c298e   Alexander Kapshuk   ver_linux: proc/m...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
  test -e /proc/modules &&
  sort /proc/modules |
  sed '
  	s/ .*//
  	H
  ${
  	g
  	s/^
  /Modules Loaded\t\t/
  	y/
  / /
  	q
  }
  	d
  '