From 922eff6d7456a113601c60b8fccec0f30f670fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Wed, 22 Aug 2012 13:26:58 +0200 Subject: [PATCH] Avoid creation of tap interfaces during system check. Running "tunctl" will result in creation of a tap interface. In order to avoid it call it with some "-d" parameter which will make it exit fast. --- slapos/format.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/slapos/format.py b/slapos/format.py index 449664894..81acd4947 100644 --- a/slapos/format.py +++ b/slapos/format.py @@ -1040,8 +1040,10 @@ class Config(object): def checkRequiredBinary(binary_list): missing_binary_list = [] for b in binary_list: + if type(b) != type([]): + b = [b] try: - callAndRead([b]) + callAndRead(b) except ValueError: pass except OSError: @@ -1126,7 +1128,7 @@ class Config(object): if self.alter_user: self.checkRequiredBinary(['groupadd', 'useradd', 'usermod']) if self.create_tap: - self.checkRequiredBinary(['tunctl']) + self.checkRequiredBinary([['tunctl', '-d']]) if self.alter_network: self.checkRequiredBinary(['ip']) # Required, even for dry run -- 2.30.9