diff --git a/dashboard/src/components/SystemInfo.vue b/dashboard/src/components/SystemInfo.vue index 89dcaa070..1ce6f0e11 100644 --- a/dashboard/src/components/SystemInfo.vue +++ b/dashboard/src/components/SystemInfo.vue @@ -83,7 +83,7 @@ onMounted(async () => {
{{ $t('system.info.platformVersion') }}
-
v{{ config.version }} ({{ config.ubuntuVersion }})
+
v{{ config.version }} ({{ config.ubuntuVersion }} {{ config.kernelVersion }})
{{ $t('system.info.vendor') }}
diff --git a/src/dashboard.js b/src/dashboard.js index 80856d611..34604f321 100644 --- a/src/dashboard.js +++ b/src/dashboard.js @@ -56,6 +56,7 @@ async function clearLocation() { async function getConfig() { const ubuntuVersion = await system.getUbuntuVersion(); + const kernelVersion = await system.getKernelVersion(); const profileConfig = await userDirectory.getProfileConfig(); const externalLdapConfig = await externalLdap.getConfig(); @@ -71,6 +72,7 @@ async function getConfig() { mailFqdn: (await mailServer.getLocation()).fqdn, version: constants.VERSION, ubuntuVersion, + kernelVersion, isDemo: constants.DEMO, cloudronName: await branding.getCloudronName(), footer: await branding.renderFooter(), diff --git a/src/system.js b/src/system.js index 83775ed6b..3bfd8ef87 100644 --- a/src/system.js +++ b/src/system.js @@ -4,6 +4,7 @@ exports = module.exports = { reboot, getInfo, getUbuntuVersion, + getKernelVersion, getSwaps, checkDiskSpace, getMemory, @@ -358,6 +359,13 @@ async function checkRebootRequired() { } } +async function getKernelVersion() { + const data = safe.fs.readFileSync('/proc/version', 'utf-8'); + if (data === null) throw new BoxError(BoxError.FS_ERROR, safe.error.message); + const version = data.match(/^Linux version (\S+)/)[1]; + return `Linux ${version}`; +} + async function getUbuntuVersion() { const release = safe.fs.readFileSync('/etc/lsb-release', 'utf-8'); if (release === null) throw new BoxError(BoxError.FS_ERROR, safe.error.message);