Hello,

Am using,

Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2019.2

with kernel,

4.19.0-kali5-686-pae #1 SMP Debian 4.19.37-2kali1 (2019-05-15) i686 GNU/Linux

I was previously using network-manager on this machine and had no issues with both my LAN card and Wi-Fi card (Complete network access). For finer grained control I switched to using /etc/network/interfaces. Here is my configuration

cat /etc/network/interfaces
Code:
source /etc/network/interfaces.d/*


auto lo
iface lo inet loopback


auto eth0
iface eth0 inet dhcp        


auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Am getting an error
/etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such device or address
This happens when I run
Code:
systemctl restart networking.service
. Even after a reboot when I display
Code:
systemctl status networking.service
the error is still present as per below

Code:
systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-05-22 08:42:26 EAT; 2h 17min ago
Docs: man:interfaces(5)
Process: 348 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Main PID: 348 (code=exited, status=1/FAILURE)


May 22 08:42:19 gate dhclient[395]: DHCPACK of 192.168.37.147 from 192.168.37.1
May 22 08:42:19 gate ifup[348]: DHCPACK of 192.168.37.147 from 192.168.37.1
May 22 08:42:20 gate dhclient[395]: bound to 192.168.37.147 -- renewal in 20857 seconds.
May 22 08:42:20 gate ifup[348]: bound to 192.168.37.147 -- renewal in 20857 seconds.
May 22 08:42:26 gate ifup[348]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such dev
May 22 08:42:26 gate ifup[348]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
May 22 08:42:26 gate ifup[348]: ifup: failed to bring up wlan0
May 22 08:42:26 gate systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
May 22 08:42:26 gate systemd[1]: networking.service: Failed with result 'exit-code'.
May 22 08:42:26 gate systemd[1]: Failed to start Raise network interfaces.
As can be seen the LAN card comes up fine but the Wi-Fi card fails.

I can start the Wi-Fi card manually by

1.
Code:
wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
2.
Code:
 dhclient wlan0
Its just that I wanted to automate this across reboots or shutdowns and run into the above issue while doing this.

Further research led me upstream to bugs https://bit.ly/2JCWBXp and https://bit.ly/2wcTsVm

These seem identical to my issue only problem is that the proposed solutions in them don't work in my case. In one case it seems the concerned file /etc/network/if-pre-up.d/wpasupplicant has changed since the bug was reported and in the other case renaming the start-stop-daemon doesnt work and I suspect it might break a few things later on.

Any pointers or suggestions?

Regards
Kysh