api: apt/versions: fix running_kernel string for unknown package case
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
This commit is contained in:
parent
fc5a012068
commit
51ac17b56e
|
@ -303,10 +303,13 @@ pub fn get_versions() -> Result<Vec<APTUpdateInfo>, Error> {
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
||||||
let running_kernel = nix::sys::utsname::uname().release().to_owned();
|
let running_kernel = format!(
|
||||||
|
"running kernel: {}",
|
||||||
|
nix::sys::utsname::uname().release().to_owned()
|
||||||
|
);
|
||||||
if let Some(proxmox_backup) = pbs_packages.iter().find(|pkg| pkg.package == "proxmox-backup") {
|
if let Some(proxmox_backup) = pbs_packages.iter().find(|pkg| pkg.package == "proxmox-backup") {
|
||||||
let mut proxmox_backup = proxmox_backup.clone();
|
let mut proxmox_backup = proxmox_backup.clone();
|
||||||
proxmox_backup.extra_info = Some(format!("running kernel: {}", running_kernel));
|
proxmox_backup.extra_info = Some(running_kernel);
|
||||||
packages.push(proxmox_backup);
|
packages.push(proxmox_backup);
|
||||||
} else {
|
} else {
|
||||||
packages.push(unknown_package("proxmox-backup".into(), Some(running_kernel)));
|
packages.push(unknown_package("proxmox-backup".into(), Some(running_kernel)));
|
||||||
|
|
Loading…
Reference in New Issue