From 2a3c19cc90c2a00cfb73117ad200d0cb53572881 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 13 Jul 2022 18:48:27 +0800 Subject: [PATCH] Update index.py --- plugins/php/index.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 23012a4d9..4a89a7204 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -783,8 +783,12 @@ def installPreInspection(version): if sysName == 'debian' and sys_id > 10: return 'debian10可以安装' - if sysName == 'fedora' and sys_id > 31: - return 'fedora[31]可以安装' + if sysName == 'fedora': + sys_id = mw.execShell( + "cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}'") + sysId = sys_id[0].strip() + if int(sysId) > 31: + return 'fedora[{}]不可安装'.format(sysId) return 'ok' if __name__ == "__main__":