linux-old/scripts/ver_linux
<<
>>
Prefs
   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.
   6#
   7PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
   8echo 'If some fields are empty or look unusual you may have an old version.'
   9echo 'Compare to the current minimal requirements in Documentation/Changes.'
  10echo ' '
  11
  12uname -a
  13echo ' '
  14
  15echo "Gnu C                 " `gcc --version`
  16
  17make --version 2>&1 | awk -F, '{print $1}' | awk \
  18      '/GNU Make/{print "Gnu make              ",$NF}'
  19
  20ld -v 2>&1 | awk -F\) '{print $1}' | awk \
  21      '/BFD/{print "binutils              ",$NF}'
  22
  23fdformat --version | awk -F\- '{print "util-linux            ", $NF}'
  24
  25mount --version | awk -F\- '{print "mount                 ", $NF}'
  26
  27insmod -V  2>&1 | awk 'NR==1 {print "modutils              ",$NF}'
  28
  29tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
  30'NR==1 {print "e2fsprogs             ", $2}'
  31
  32reiserfsck 2>&1 | grep reiserfsprogs | awk \
  33'NR==1{print "reiserfsprogs         ", $NF}'
  34
  35cardmgr -V 2>&1| grep version | awk \
  36'NR==1{print "pcmcia-cs             ", $3}'
  37
  38pppd --version 2>&1| grep version | awk \
  39'NR==1{print "PPP                   ", $3}'
  40
  41isdnctrl 2>&1 | grep version | awk \
  42'NR==1{print "isdn4k-utils          ", $NF}'
  43
  44ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \
  45-e 's/\.so$//' | awk -F'[.-]'   '{print "Linux C Library        " \
  46$(NF-2)"."$(NF-1)"."$NF}'
  47
  48ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -1 | awk \
  49'NR==1{print "Dynamic linker (ldd)  ", $NF}'
  50
  51ls -l /usr/lib/lib{g,stdc}++.so  2>/dev/null | awk -F. \
  52       '{print "Linux C++ Library      " $4"."$5"."$6}'
  53
  54ps --version 2>&1 | awk 'NR==1{print "Procps                ", $NF}'
  55
  56ifconfig --version 2>&1 | grep tools | awk \
  57'NR==1{print "Net-tools             ", $NF}'
  58
  59# Kbd needs 'loadkeys -h',
  60loadkeys -h 2>&1 | awk \
  61'(NR==1 && ($3 !~ /option/)) {print "Kbd                   ", $3}'
  62
  63# while console-tools needs 'loadkeys -V'.
  64loadkeys -V 2>&1 | awk \
  65'(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools         ", $3}'
  66
  67expr --v 2>&1 | awk 'NR==1{print "Sh-utils              ", $NF}'
  68
  69if [ -e /proc/modules ]; then
  70    X=`cat /proc/modules | sed -e "s/ .*$//"`
  71    echo "Modules Loaded         "$X
  72fi
  73
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.