From f1f0cbf05e302fe09ef9ed6139892a6d699deb85 Mon Sep 17 00:00:00 2001 From: nu_no Date: Sat, 28 Sep 2019 13:30:41 +0200 Subject: [PATCH] add sentinel files Source: http://linuxmafia.com/faq/Admin/release-files.html --- patchwork/info.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/patchwork/info.py b/patchwork/info.py index d737d94..2bee2fb 100644 --- a/patchwork/info.py +++ b/patchwork/info.py @@ -24,8 +24,13 @@ def distro_name(c): * ``other`` """ sentinel_files = { - "fedora": ("fedora-release",), "centos": ("centos-release",), + "debian": ("debian_version", "debian_release"), + "fedora": ("fedora-release",), + "knoppix": ("knoppix_version"), + "mint": ("lsb-release"), + "rhel": ("redhat-release", "redhat_version"), + "ubuntu": ("lsb-release",), } for name, sentinels in sentinel_files.items(): for sentinel in sentinels: @@ -47,8 +52,8 @@ def distro_family(c): release name will be returned instead. """ families = { - "debian": "debian ubuntu".split(), - "redhat": "rhel centos fedora".split(), + "debian": "debian knoppix mint ubuntu".split(), + "redhat": "centos fedora rhel".split(), } distro = distro_name(c) for family, members in families.items():