summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/ver_linux17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/ver_linux b/scripts/ver_linux
index ae426c2e6f2a..024a11ac8b97 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -178,7 +178,16 @@ awk '/version/{
substr($0,RSTART,RLENGTH))
}'
-if [ -e /proc/modules ]; then
- X=`cat /proc/modules | sed -e "s/ .*$//"`
- echo "Modules Loaded "$X
-fi
+test -e /proc/modules &&
+sort /proc/modules |
+sed '
+ s/ .*//
+ H
+${
+ g
+ s/^\n/Modules Loaded\t\t/
+ y/\n/ /
+ q
+}
+ d
+'