bug fix osname when using symlink to runon

This commit is contained in:
Gilles Grandou 2023-12-04 23:44:43 +01:00
parent db97400377
commit 39019f5df0
1 changed files with 3 additions and 5 deletions

View File

@ -202,12 +202,10 @@ def run_container(client, container):
def main():
osname = None
run_name = os.path.basename(os.sys.argv[0])
if run_name == 'runos':
if run_name == "runon":
pass
elif run_name.startswith('runon'):
m = re.match('runon[-_]?(.*)$', run_name)
if m:
osname = m[1]
elif run_name.startswith("runon_"):
osname = run_name[len("runon_"):]
else:
osname = run_name