]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/fireinfo/fireinfo-system-ignore-when-the-serial-number-is-ssn.patch
hdparm: Fix build with glibc 2.36
[people/pmueller/ipfire-2.x.git] / src / patches / fireinfo / fireinfo-system-ignore-when-the-serial-number-is-ssn.patch
1 From 4d74466456c0824663e10881f9deabcd1f4d32c3 Mon Sep 17 00:00:00 2001
2 From: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Fri, 8 Jul 2022 08:31:25 +0000
4 Subject: [PATCH] system: Ignore when the serial number is "SSN"
5
6 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 ---
8 src/fireinfo/system.py | 6 ++++--
9 1 file changed, 4 insertions(+), 2 deletions(-)
10
11 diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py
12 index c9c81b1..9edc345 100644
13 --- a/src/fireinfo/system.py
14 +++ b/src/fireinfo/system.py
15 @@ -44,7 +44,7 @@ INVALID_ID_STRINGS = (
16 "EVAL",
17 "Not Applicable",
18 "None", "empty",
19 - "Serial", "System Serial Number",
20 + "Serial", "System Serial Number", "SSN",
21 "XXXXX",
22 "01010101-0101-0101-0101-010101010101",
23 "00020003-0004-0005-0006-000700080009",
24 @@ -272,7 +272,9 @@ class System(object, metaclass=Singleton):
25 if not ids:
26 root_disk_serial = self.root_disk_serial
27 if root_disk_serial and not root_disk_serial.startswith("QM000"):
28 - ids.append(root_disk_serial)
29 + # Skip any invalid IDs
30 + if not root_disk_serial in INVALID_ID_STRINGS:
31 + ids.append(root_disk_serial)
32
33 # As last resort, we use the UUID from pakfire.
34 if not ids:
35 --
36 2.30.2
37