Skip to content

Commit

Permalink
Make copy of dhclient executable before running it
Browse files Browse the repository at this point in the history
  • Loading branch information
mafik committed Dec 6, 2023
1 parent d7fc794 commit 7fef0f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dev_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7fef0f9

Please sign in to comment.