bug fix osname when using symlink to runon
This commit is contained in:
parent
db97400377
commit
39019f5df0
@ -202,12 +202,10 @@ def run_container(client, container):
|
|||||||
def main():
|
def main():
|
||||||
osname = None
|
osname = None
|
||||||
run_name = os.path.basename(os.sys.argv[0])
|
run_name = os.path.basename(os.sys.argv[0])
|
||||||
if run_name == 'runos':
|
if run_name == "runon":
|
||||||
pass
|
pass
|
||||||
elif run_name.startswith('runon'):
|
elif run_name.startswith("runon_"):
|
||||||
m = re.match('runon[-_]?(.*)$', run_name)
|
osname = run_name[len("runon_"):]
|
||||||
if m:
|
|
||||||
osname = m[1]
|
|
||||||
else:
|
else:
|
||||||
osname = run_name
|
osname = run_name
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user