Re: [RFC] Putting the date back into utsname::version
Ben Hutchings <ben@decadent.org.uk> writes:
> We have a longstanding support problem where there is confusion between
> the kernel release string (utsname::release, output of uname -r, tail of
> package names) and the kernel package version.
Agreed.
> Would anyone like to argue in favour of any particular alternative?
I don't really care about the format of "uname -v" but I'd really like
to have a stable way to get just the version number part.
Now I have:
case "$DISTRO" in
Debian) # 2.6.32-39
if uname -v | grep -q Debian; then
VERSION="$(uname -v | cut -d " " -f 4)"
else
VERSION="$(cut -d " " -f 5 /proc/version | cut -d ")" -f 1)"
fi
;;
Ubuntu)
# 2.6.32-37.81
VERSION="$(cut -d " " -f 2 /proc/version_signature | cut -d "-" -f 1-2)"
;;
esac
Reply to: