From fb15313e2e73ef7c215cc43a64a45bfbc7dc0b27 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 23 May 2011 15:50:00 +0200 Subject: [PATCH] fix passing optional -i to vuseradd --- sliver_vs.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sliver_vs.py b/sliver_vs.py index 0b15e25..8382c6d 100644 --- a/sliver_vs.py +++ b/sliver_vs.py @@ -110,11 +110,18 @@ class Sliver_VS(accounts.Account, vserver.VServer): personality="linux64" return personality - extra = "" + command=[] + # be verbose + command += ['/bin/bash','-x',] + command += ['/usr/sbin/vuseradd', ] if 'attributes' in rec and 'isolate_loopback' in rec['attributes'] and rec['attributes']['isolate_loopback'] == '1': - extra = "-i" + command += [ "-i",] + # the vsliver imge to use + command += [ '-t', vref, ] + # slice name + command += [ name, ] # logger.log_call(['/usr/sbin/vuseradd', '-t', vref, name, ], timeout=15*60) - logger.log_call(['/bin/bash','-x','/usr/sbin/vuseradd', extra, '-t', vref, name, ], timeout=15*60) + logger.log_call(command, timeout=15*60) # export slicename to the slice in /etc/slicename file('/vservers/%s/etc/slicename' % name, 'w').write(name) file('/vservers/%s/etc/slicefamily' % name, 'w').write(vref) -- 2.43.0