From 7fef0f9097c0223be70f24ebd4968cd749660e6d Mon Sep 17 00:00:00 2001 From: Marek Rogalski Date: Wed, 6 Dec 2023 14:55:19 +0100 Subject: [PATCH] Make copy of dhclient executable before running it --- src/dev_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dev_commands.py b/src/dev_commands.py index de73a65..abd19a1 100644 --- a/src/dev_commands.py +++ b/src/dev_commands.py @@ -101,6 +101,7 @@ def run_systemd(env): def run_dhclient(namespace, interface): if not os.path.exists('./tests/dhclient'): shutil.copyfile('/sbin/dhclient', './tests/dhclient') + shutil.copymode('/sbin/dhclient', './tests/dhclient') subprocess.check_call(['ip', 'netns', 'exec', namespace, './tests/dhclient', '-1', '-cf', './tests/dhclient.conf', '-sf', './tests/dhclient-script', '-pf', './tests/dhclient.pid', interface]) try: yield