get_hardware_address: must be uppercased

we're a bit strict here what we accept, rather than changing that
lets do it like PVE/PMG and uppercase.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-26 20:18:26 +01:00
parent eed1bae554
commit 52fe9e8ece

View File

@ -327,7 +327,7 @@ pub fn get_hardware_address() -> Result<String, Error> {
let contents = proxmox::tools::fs::file_get_contents(FILENAME)?; let contents = proxmox::tools::fs::file_get_contents(FILENAME)?;
let digest = md5sum(&contents)?; let digest = md5sum(&contents)?;
Ok(proxmox::tools::bin_to_hex(&digest)) Ok(proxmox::tools::bin_to_hex(&digest).to_uppercase())
} }
pub fn assert_if_modified(digest1: &str, digest2: &str) -> Result<(), Error> { pub fn assert_if_modified(digest1: &str, digest2: &str) -> Result<(), Error> {