Commit 1e00616d authored by Vitaly Lipatov's avatar Vitaly Lipatov

distro_info: add --glibc-version

parent c71b13d8
......@@ -529,6 +529,13 @@ get_uname()
tolower $(uname $1) | tr -d " \t\r\n"
}
get_glibc_version()
{
for i in /lib/x86_64-linux-gnu /lib64 /lib/i386-linux-gnu /lib ; do
[ -x "$ROOTDIR$i/libc.so.6" ] && $ROOTDIR$i/libc.so.6 | head -n1 | grep "version" | sed -e 's|.*version ||' -e 's|\.$||' && return
done
}
get_base_os_name()
{
local DIST_OS
......@@ -834,7 +841,8 @@ case "$1" in
echo " -y - print running service manager"
echo " --pretty - print pretty distro name"
echo " -v - print version of the distro"
echo " --full-version - print full version of the distro"
echo " --full-version - print full version of the distro"
echo " --glibc-version - print system glibc version"
echo " -V - print the utility version"
echo "Run without args to print all information."
exit 0
......@@ -863,6 +871,11 @@ case "$1" in
get_debian_arch
exit 0
;;
--glibc-version)
override_distrib "$2"
get_glibc_version
exit 0
;;
-d)
override_distrib "$2"
echo $DISTRIB_ID
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment