Browse Source
Currently network configuration is launched by udev as soon as it discovers a driver. This isn't such a good idea since we don't know if network configuration is actually required. Change this by writing the udev rules on the fly if required.master

4 changed files with 19 additions and 3 deletions
@ -1,2 +0,0 @@
@@ -1,2 +0,0 @@
|
||||
ACTION=="add", SUBSYSTEM=="net", RUN+="/sbin/ifup $env{INTERFACE}" |
||||
ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/netroot $env{INTERFACE}" |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh |
||||
|
||||
# Don't continue if we don't need network |
||||
[ -z "$netroot" ] && return; |
||||
|
||||
# Write udev rules |
||||
{ |
||||
printf 'ACTION=="add", SUBSYSTEM=="net", RUN+="/sbin/ifup $env{INTERFACE}"\n' |
||||
printf 'ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/netroot $env{INTERFACE}"\n' |
||||
} > /etc/udev/rules.d/60-net.rules |
Loading…
Reference in new issue