From 2a9ee9f7f2c7f98d4cd72c5764d7bca642c79d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Thu, 4 Jul 2019 12:02:28 +0200 Subject: [PATCH] Setup cockpit only on Ubuntu 18.04 --- 1.Base/4.cockpit/0_setup.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/1.Base/4.cockpit/0_setup.py b/1.Base/4.cockpit/0_setup.py index 2aac7dfd..f8a23921 100644 --- a/1.Base/4.cockpit/0_setup.py +++ b/1.Base/4.cockpit/0_setup.py @@ -4,12 +4,9 @@ import os def setup(interactive=False): - if os.path.exists('/etc/lsb-release'): - with open('/etc/lsb-release', 'r') as fo: - content = fo.read() - if '16.04' in content: - utils.log('Skipping cockpit setup because OS is Ubuntu 16.04.') - return + if os.system('lsb_release -a | grep "18.04"') != 0: + utils.log('Skipping cockpit setup because OS is not Ubuntu 18.04.') + return cmds = [ 'apt install -y software-properties-common', 'add-apt-repository universe', -- GitLab