mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 04:13:01 +00:00
nixos/wpa_supplicant: fix unit-start script
Ever since setting up bonding the `wpa_supplicant-unit-start` script has been failing. This is because the file `bonding_masters` in `/sys/class/net/` is *not* a directory containing `uevent`. Adding a test to verify the `uevent` path to be sourced exists resolves the problem.
This commit is contained in:
parent
27670961f5
commit
82fc9ab5c8
@ -236,9 +236,12 @@ in {
|
||||
${if ifaces == [] then ''
|
||||
for i in $(cd /sys/class/net && echo *); do
|
||||
DEVTYPE=
|
||||
source /sys/class/net/$i/uevent
|
||||
if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
|
||||
ifaces="$ifaces''${ifaces:+ -N} -i$i"
|
||||
UEVENT_PATH=/sys/class/net/$i/uevent
|
||||
if [ -e "$UEVENT_PATH" ]; then
|
||||
source "$UEVENT_PATH"
|
||||
if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
|
||||
ifaces="$ifaces''${ifaces:+ -N} -i$i"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
'' else ''
|
||||
|
Loading…
Reference in New Issue
Block a user