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

View File

@ -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