Projects
home:Eustace:branches:Eulaceura:Factory
sos
_service:obs_scm:add-uniontech-os-support.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:add-uniontech-os-support.patch of Package sos
From dcb9273e1f5f55fec2957629a5a69ca396f28c51 Mon Sep 17 00:00:00 2001 From: root <root@localhost.localdomain> Date: Mon, 19 Jul 2021 15:48:03 +0800 Subject: [PATCH] add uniontech os support --- sos/policies/uniontech.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sos/policies/uniontech.py diff --git a/sos/policies/uniontech.py b/sos/policies/uniontech.py new file mode 100644 index 0000000..cd30136 --- /dev/null +++ b/sos/policies/uniontech.py @@ -0,0 +1,26 @@ +from __future__ import print_function + +from sos.plugins import RedHatPlugin +from sos.policies.redhat import RedHatPolicy, OS_RELEASE +import os + +class UnionTechPolicy(RedHatPolicy): + + distro = "UnionTech" + vendor = "the UnionTech Project" + vendor_url = "https://www.chinauos.com/" + + def __init__(self, sysroot=None): + super(UnionTechPolicy, self).__init__(sysroot=sysroot) + + @classmethod + def check(cls): + if not os.path.exists(OS_RELEASE): + return False + + with open(OS_RELEASE, 'r') as f: + for line in f: + if line.startswith('NAME'): + if 'UnionTech' in line: + return True + return False -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2