kylin-system-version.conf版本修改

This commit is contained in:
Xueyi Luo 2022-05-05 17:04:10 +08:00
parent 2d5f5343f4
commit 91d94945ca
1 changed files with 8 additions and 2 deletions

View File

@ -431,11 +431,17 @@ class Sqlite3Server(object):
except Exception as e:
logging.error(str(e))
def _refresh_system_version(self, version=''):
def _refresh_system_version(self, version='', release_id = ''):
try:
#刷新系统版本号:version
version = version.strip()
release_id = release_id.strip()
#刷新系统版本号:version
self.ucconfigs.setValue("SYSTEM","version",str(version),True)
version_path = "/etc/kylin-version/kylin-system-version.conf"
if os.path.isfile(version_path):
cnf = UpgradeConfig(datadir = "/etc/kylin-version", name = "kylin-system-version.conf")
cnf.setValue("SYSTEM","version",str(version),True)
version = ""
#初始化系统版本号:kylin_release_id
version_path = "/etc/os-release"