Commit 2f97093a authored by Holger Levsen's avatar Holger Levsen

reproducible Debian: fixup dsa-check-running-kernel to deal with the latest ubuntu LTS changes…

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent ef0321ca
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then
echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
echo "WARNING: Running kernel does not match on-disk kernel image:"
echo " $running_version"
echo "!="
echo " $on_disk_version"
exit $WARNING
fi
......
......@@ -201,8 +201,13 @@ for on_disk in \
fi
[ -z "$on_disk_version" ] || break
on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
if [ -x /usr/bin/lsb_release ] ; then
vendor=$(lsb_release -i -s)
if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
fi
fi
[ -z "$on_disk_version" ] || break
echo "UNKNOWN: Failed to get a version string from image $on_disk"
exit $UNKNOWN
else
......@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
fi
if [ "$running_version" != "$on_disk_version" ]; then