~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/ver_linux

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/ver_linux (Version linux-6.11.5) and /scripts/ver_linux (Version linux-2.6.0)


  1 #!/usr/bin/awk -f                              !!   1 #!/bin/sh
  2 # SPDX-License-Identifier: GPL-2.0             << 
  3 # Before running this script please ensure tha      2 # Before running this script please ensure that your PATH is
  4 # typical as you use for compilation/installat !!   3 # typical as you use for compilation/istallation. I use
  5 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin      4 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
  6 # differ on your system.                            5 # differ on your system.
                                                   >>   6 #
                                                   >>   7 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:$PATH
                                                   >>   8 echo 'If some fields are empty or look unusual you may have an old version.'
                                                   >>   9 echo 'Compare to the current minimal requirements in Documentation/Changes.'
                                                   >>  10 echo ' '
  7                                                    11 
  8 BEGIN {                                        !!  12 uname -a
  9         usage = "If some fields are empty or l !!  13 echo ' '
 10         usage = usage "Compare to the current  !!  14 
 11         print usage                            !!  15 gcc --version 2>&1| head -n 1 | grep -v gcc | awk \
 12                                                !!  16 'NR==1{print "Gnu C                 ", $1}'
 13         system("uname -a")                     !!  17 
 14         printf("\n")                           !!  18 gcc --version 2>&1| grep gcc | awk \
 15                                                !!  19 'NR==1{print "Gnu C                 ", $3}'
 16         vernum = "[0-9]+([.]?[0-9]+)+"         !!  20 
 17         libc = "libc[.]so[.][0-9]+$"           !!  21 make --version 2>&1 | awk -F, '{print $1}' | awk \
 18         libcpp = "(libg|stdc)[+]+[.]so([.][0-9 !!  22       '/GNU Make/{print "Gnu make              ",$NF}'
 19                                                !!  23 
 20         printversion("GNU C", version("gcc -du !!  24 ld -v 2>&1 | awk -F\) '{print $1}' | awk \
 21         printversion("GNU Make", version("make !!  25       '/BFD/{print "binutils              ",$NF}'
 22         printversion("Binutils", version("ld - !!  26 
 23         printversion("Util-linux", version("mo !!  27 fdformat --version | awk -F\- '{print "util-linux            ", $NF}'
 24         printversion("Mount", version("mount - !!  28 
 25         printversion("Module-init-tools", vers !!  29 mount --version | awk -F\- '{print "mount                 ", $NF}'
 26         printversion("E2fsprogs", version("tun !!  30 
 27         printversion("Jfsutils", version("fsck !!  31 depmod -V  2>&1 | awk 'NR==1 {print "module-init-tools     ",$NF}'
 28         printversion("Reiserfsprogs", version( !!  32 
 29         printversion("Reiser4fsprogs", version !!  33 tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
 30         printversion("Xfsprogs", version("xfs_ !!  34 'NR==1 {print "e2fsprogs             ", $2}'
 31         printversion("Pcmciautils", version("p !!  35 
 32         printversion("Pcmcia-cs", version("car !!  36 fsck.jfs -V 2>&1 | grep version | sed 's/,//' |  awk \
 33         printversion("Quota-tools", version("q !!  37 'NR==1 {print "jfsutils              ", $3}'
 34         printversion("PPP", version("pppd --ve !!  38 
 35         printversion("Isdn4k-utils", version(" !!  39 reiserfsck -V 2>&1 | grep reiserfsprogs | awk \
 36         printversion("Nfs-utils", version("sho !!  40 'NR==1{print "reiserfsprogs         ", $NF}'
 37         printversion("Bison", version("bison - !!  41 
 38         printversion("Flex", version("flex --v !!  42 xfs_db -V 2>&1 | grep version | awk \
 39                                                !!  43 'NR==1{print "xfsprogs              ", $3}'
 40         while ("ldconfig -p 2>/dev/null" | get !!  44 
 41                 if ($NF ~ libc || $NF ~ libcpp !!  45 cardmgr -V 2>&1| grep version | awk \
 42                         if (!seen[ver = versio !!  46 'NR==1{print "pcmcia-cs             ", $3}'
 43                                 printversion(" !!  47 
 44                                                !!  48 quota -V 2>&1 | grep version | awk \
 45         printversion("Dynamic linker (ldd)", v !!  49 'NR==1{print "quota-tools           ", $NF}'
 46         printversion("Procps", version("ps --v !!  50 
 47         printversion("Net-tools", version("ifc !!  51 pppd --version 2>&1| grep version | awk \
 48         printversion("Kbd", version("loadkeys  !!  52 'NR==1{print "PPP                   ", $3}'
 49         printversion("Console-tools", version( !!  53 
 50         printversion("Sh-utils", version("expr !!  54 isdnctrl 2>&1 | grep version | awk \
 51         printversion("Udev", version("udevadm  !!  55 'NR==1{print "isdn4k-utils          ", $NF}'
 52         printversion("Wireless-tools", version !!  56 
 53                                                !!  57 showmount --version 2>&1 | grep nfs-utils | awk \
 54         while ("sort /proc/modules" | getline  !!  58 'NR==1{print "nfs-utils             ", $NF}'
 55                 mods = mods sep $1             !!  59 
 56                 sep = " "                      !!  60 ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \
 57         }                                      !!  61 -e 's/\.so$//' | awk -F'[.-]'   '{print "Linux C Library        " \
 58         printversion("Modules Loaded", mods)   !!  62 $(NF-2)"."$(NF-1)"."$NF}'
 59 }                                              !!  63 
 60                                                !!  64 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
 61 function version(cmd,    ver) {                !!  65 'NR==1{print "Dynamic linker (ldd)  ", $NF}'
 62         cmd = cmd " 2>&1"                      !!  66 
 63         while (cmd | getline > 0) {            !!  67 ls -l /usr/lib/lib{g,stdc}++.so  2>/dev/null | awk -F. \
 64                 if (match($0, vernum)) {       !!  68        '{print "Linux C++ Library      " $4"."$5"."$6}'
 65                         ver = substr($0, RSTAR !!  69 
 66                         break                  !!  70 ps --version 2>&1 | awk 'NR==1{print "Procps                ", $NF}'
 67                 }                              !!  71 
 68         }                                      !!  72 ifconfig --version 2>&1 | grep tools | awk \
 69         close(cmd)                             !!  73 'NR==1{print "Net-tools             ", $NF}'
 70         return ver                             !!  74 
 71 }                                              !!  75 # Kbd needs 'loadkeys -h',
 72                                                !!  76 loadkeys -h 2>&1 | awk \
 73 function printversion(name, value,  ofmt) {    !!  77 '(NR==1 && ($3 !~ /option/)) {print "Kbd                   ", $3}'
 74         if (value != "") {                     !!  78 
 75                 ofmt = "%-20s\t%s\n"           !!  79 # while console-tools needs 'loadkeys -V'.
 76                 printf(ofmt, name, value)      !!  80 loadkeys -V 2>&1 | awk \
 77         }                                      !!  81 '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools         ", $3}'
 78 }                                              !!  82 
                                                   >>  83 expr --v 2>&1 | awk 'NR==1{print "Sh-utils              ", $NF}'
                                                   >>  84 
                                                   >>  85 if [ -e /proc/modules ]; then
                                                   >>  86     X=`cat /proc/modules | sed -e "s/ .*$//"`
                                                   >>  87     echo "Modules Loaded         "$X
                                                   >>  88 fi
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php