mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 10:18:02 +00:00
checkconfig: Handle missing kernel version
https://github.com/lxc/lxd/issues/5151 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
0bf2d4f723
commit
c1e61eac48
6
src/lxc/cmd/lxc-checkconfig.in
Normal file → Executable file
6
src/lxc/cmd/lxc-checkconfig.in
Normal file → Executable file
@ -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/')
|
||||
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 -n "Namespaces: " && is_enabled CONFIG_NAMESPACES yes
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user