diff --git a/Dockerfile b/Dockerfile index 7791a4b..aac36ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive ENV LANG=C.UTF-8 @@ -71,9 +71,8 @@ RUN apt-get update && apt-get install -y alien && \ COPY ./ /opt/packet-hardware/ # Install packet-hardware RUN apt update && \ - apt install -y git python3 && \ - curl https://bootstrap.pypa.io/pip/3.5/get-pip.py | python3 && \ - pip3 install --no-cache-dir /opt/packet-hardware && \ + apt install -y git python3 python3-pip && \ + pip3 install --no-cache-dir --break-system-packages /opt/packet-hardware && \ apt clean -qy && \ rm -rf /var/lib/apt/lists/* && \ rm -rf /opt/packet-hardware diff --git a/packethardware/component/disk.py b/packethardware/component/disk.py index ca8db87..07aac5d 100644 --- a/packethardware/component/disk.py +++ b/packethardware/component/disk.py @@ -34,6 +34,16 @@ def __init__(self, lsblk): ), "tool": self.lsblk["tool"], } + self.lsblk["rota"] = self.data["rota"] + self.lsblk["size"] = self.data["size"] + if "children" in self.lsblk: + for c in self.lsblk["children"]: + c["rota"] = ( + c["rota"] + if isinstance(c["rota"], str) + else "1" if c["rota"] else "0" + ) + c["size"] = str(c["size"]) if self.__is_nvme(): self.data["smart"] = utils.get_nvme_attributes(self.lsblk["name"])