checkconfig: Handle missing kernel version

parent 0bf2d4f7
...@@ -93,6 +93,12 @@ KVER_MINOR=$($CAT $CONFIG | grep '^# Linux.*Kernel Configuration' | \ ...@@ -93,6 +93,12 @@ KVER_MINOR=$($CAT $CONFIG | grep '^# Linux.*Kernel Configuration' | \
sed -r 's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/') sed -r 's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/')
fi fi
if [ -z "${KVER_MAJOR}" ]; then
echo "WARNING: Unable to detect version from configuration, assuming latest\n"
KVER_MAJOR="100"
KVER_MINOR="0"
fi
echo "--- Namespaces ---" echo "--- Namespaces ---"
echo -n "Namespaces: " && is_enabled CONFIG_NAMESPACES yes echo -n "Namespaces: " && is_enabled CONFIG_NAMESPACES yes
echo echo
......
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