Author: alexander
Date: 2005-12-21 03:30:02 -0700 (Wed, 21 Dec 2005)
New Revision: 1295
Added:
trunk/packages/udev/10-wait_for_sysfs.rules
trunk/packages/udev/50-network.rules
Removed:
trunk/etc/sysconfig/network-devices/
Modified:
trunk/doc/README
trunk/packages/udev/Makefile
Log:
Switched to udev-based network configuration in order to support more than
one network card.
Modified: trunk/doc/README
===================================================================
--- trunk/doc/README 2005-12-21 10:25:57 UTC (rev 1294)
+++ trunk/doc/README 2005-12-21 10:30:02 UTC (rev 1295)
@@ -140,6 +140,9 @@
Configure a known static IP address there, as described in the LFS book,
section "7.12. Configuring the network Script".
+* /etc/udev/rules.d/50-network.rules
+ Create an empty file in order to prevent udev from running dhcpcd.
+
INTERNATIONALIZATION
================
It is possible to specify the locale using the bootloader prompt, like this:
Added: trunk/packages/udev/10-wait_for_sysfs.rules
===================================================================
--- trunk/packages/udev/10-wait_for_sysfs.rules 2005-12-21 10:25:57 UTC (rev
1294)
+++ trunk/packages/udev/10-wait_for_sysfs.rules 2005-12-21 10:30:02 UTC (rev
1295)
@@ -0,0 +1,3 @@
+ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="addr_len"
+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*",
WAIT_FOR_SYSFS="bus"
Added: trunk/packages/udev/50-network.rules
===================================================================
--- trunk/packages/udev/50-network.rules 2005-12-21 10:25:57 UTC (rev
1294)
+++ trunk/packages/udev/50-network.rules 2005-12-21 10:30:02 UTC (rev
1295)
@@ -0,0 +1,7 @@
+# Run dhcpcd when anything resembling a valid Ethernet-like interface appears
+ACTION=="add", SUBSYSTEM=="net", SYSFS{addr_len}=="6",
SYSFS{address}!="00:00:00:00:00:00", RUN+="/bin/sh -c 'PATH=/sbin:/bin dhcpcd
%k -t 20 &'"
+
+# "dhcpcd -k" is not good: it destroys the cache but fails to send DHCP_RELEASE
+# Since the interface is already gone, we choose to keep the cache
+# and thus avoid the IP address leak from the DHCP server pool
+ACTION=="remove", SUBSYSTEM=="net", RUN+="/bin/sh -c 'kill `cat
/var/run/dhcpcd-%k.pid` ; exit 0'"
Modified: trunk/packages/udev/Makefile
===================================================================
--- trunk/packages/udev/Makefile 2005-12-21 10:25:57 UTC (rev 1294)
+++ trunk/packages/udev/Makefile 2005-12-21 10:30:02 UTC (rev 1295)
@@ -33,6 +33,8 @@
endif
make DESTDIR=/ EXTRAS=extras/run_directory/ install
cp $(SRC)/$(CONFIG1) /etc/udev/rules.d/25-lfs.rules
+ cp ../10-wait_for_sysfs.rules /etc/udev/rules.d/
+ cp ../50-network.rules /etc/udev/rules.d/
install -m644 -D docs/writing_udev_rules/index.html \
/usr/share/doc/$(DIR)/index.html
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page