/etc/hotplug.d/dhcp/99-dhcp_host_domain_ng.py: line 3: import: not found

Thanks! It still happens because the fix introduces a new bug.

The relevant line of code is:

[ -x $script ] && $script || . $script

where $script is the Python script.

Turns out that it is executable, so it does get run directly but it exits non-0 (1 to be precise), so the next part also runs (. $script), causing it to be sourced and as such interpreted by the shell.

I’m going to investigate it a bit further to understand why it’s exiting 1 and will try to submit fixes to both problems if I can.

It would be helpful if there was a link between the issue and the merge requests or commits that fixed it. :frowning:

1 Like