diff --git a/src/bootupd.rs b/src/bootupd.rs
index 6baa3246..f5a8529d 100644
--- a/src/bootupd.rs
+++ b/src/bootupd.rs
@@ -388,7 +388,7 @@ pub(crate) fn print_status(status: &Status) -> Result<()> {
}
}
- if let Some(coreos_aleph) = coreos::get_aleph_version()? {
+ if let Some(coreos_aleph) = coreos::get_aleph_version(Path::new("/"))? {
println!("CoreOS aleph version: {}", coreos_aleph.aleph.version);
}
diff --git a/src/coreos.rs b/src/coreos.rs
index 2ee70024..9977acef 100644
--- a/src/coreos.rs
+++ b/src/coreos.rs
@@ -8,9 +8,8 @@
use anyhow::{Context, Result};
use chrono::prelude::*;
-use openat_ext::OpenatDirExt;
use serde::{Deserialize, Serialize};
-use std::fs::{canonicalize, symlink_metadata};
+use std::fs::File;
use std::path::Path;
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Ord, PartialOrd, PartialEq, Eq)]
@@ -28,35 +27,21 @@ pub(crate) struct AlephWithTimestamp {
}
/// Path to the file, see above
-const ALEPH_PATH: &str = "/sysroot/.coreos-aleph-version.json";
+const ALEPH_PATH: &str = "sysroot/.coreos-aleph-version.json";
-pub(crate) fn get_aleph_version() -> Result