Port the recent cache changes forward and backward between mips and
[linux-2.6/linux-mips.git] / scripts / ver_linux
blob20ebfd3902b86cdcb76d18b1526b9900a41aaf3c
1 #!/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.
7 PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
8 echo '-- Versions installed: (if some fields are empty or look'
9 echo '-- unusual then possibly you have very old versions)'
10 uname -a
11 insmod -V 2>&1 | awk 'NR==1 {print "Kernel modules ",$NF}'
12 echo "Gnu C " `gcc --version`
13 ld -v 2>&1 | awk -F\) '{print $1}' | awk \
14 '/BFD/{print "Binutils ",$NF}'
15 ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed -e 's/\.so$//' \
16 | awk -F'[.-]' '{print "Linux C Library " $(NF-2)"."$(NF-1)"."$NF}'
17 echo -n "Dynamic linker "
18 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -1
19 ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \
20 '{print "Linux C++ Library " $4"."$5"."$6}'
21 ps --version 2>&1 | awk 'NR==1{print "Procps ", $NF}'
22 mount --version | awk -F\- '{print "Mount ", $NF}'
23 hostname -V 2>&1 | awk 'NR==1{print "Net-tools ", $NF}'
24 # Kbd needs 'loadkeys -h',
25 loadkeys -h 2>&1 | awk \
26 '(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
27 # while console-tools needs 'loadkeys -V'.
28 loadkeys -V 2>&1 | awk \
29 '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}'
30 expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}'
31 X=`cat /proc/modules | sed -e "s/ .*$//"`
32 echo "Modules Loaded "$X