Author: alexander Date: 2006-09-08 10:17:55 -0600 (Fri, 08 Sep 2006) New Revision: 1725
Added: branches/6.2/packages/udev/dhcp-helper Modified: branches/6.2/doc/README branches/6.2/packages/lfs-bootscripts/lfs-bootscripts-6.2-livecd-1.patch branches/6.2/packages/udev/50-network.rules branches/6.2/packages/udev/Makefile Log: Removed the pointless warning about missing network interface configuration when hibernating the computer that obtained its IP address from DHCP via the udev rule (see http://wiki.linuxfromscratch.org/lfs/ticket/1866). The case when the user manually runs the "ip" command to configure the network interface for a static IP address still results in a warning. Modified: branches/6.2/doc/README =================================================================== --- branches/6.2/doc/README 2006-09-08 16:10:27 UTC (rev 1724) +++ branches/6.2/doc/README 2006-09-08 16:17:55 UTC (rev 1725) @@ -165,7 +165,7 @@ AUTOSSHD ============================ It is possible to start the sshd daemon automatically upon boot. To do that, -you have to customize the CD. Modify the following files: +you have to customize the CD. Create the following files: * /.autosshd This is the file that indicates that the sshd daemon should be @@ -189,9 +189,6 @@ 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 - Remove this file in order to prevent udev from running dhcpcd. - INTERNATIONALIZATION ============================ It is possible to specify the locale using the bootloader prompt, like this: Modified: branches/6.2/packages/lfs-bootscripts/lfs-bootscripts-6.2-livecd-1.patch =================================================================== --- branches/6.2/packages/lfs-bootscripts/lfs-bootscripts-6.2-livecd-1.patch 2006-09-08 16:10:27 UTC (rev 1724) +++ branches/6.2/packages/lfs-bootscripts/lfs-bootscripts-6.2-livecd-1.patch 2006-09-08 16:17:55 UTC (rev 1725) @@ -92,9 +92,9 @@ + ln -sf ../init.d/network ${EXTDIR}/rc.d/rc0.d/K80network + ln -sf ../init.d/network ${EXTDIR}/rc.d/rc1.d/K80network + ln -sf ../init.d/network ${EXTDIR}/rc.d/rc2.d/K80network -+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc3.d/S20network -+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc4.d/S20network -+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc5.d/S20network ++ # ln -sf ../init.d/network ${EXTDIR}/rc.d/rc3.d/S20network ++ # ln -sf ../init.d/network ${EXTDIR}/rc.d/rc4.d/S20network ++ # ln -sf ../init.d/network ${EXTDIR}/rc.d/rc5.d/S20network + ln -sf ../init.d/network ${EXTDIR}/rc.d/rc6.d/K80network + ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs + ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev Modified: branches/6.2/packages/udev/50-network.rules =================================================================== --- branches/6.2/packages/udev/50-network.rules 2006-09-08 16:10:27 UTC (rev 1724) +++ branches/6.2/packages/udev/50-network.rules 2006-09-08 16:17:55 UTC (rev 1725) @@ -1,7 +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 &'" +ACTION=="add", SUBSYSTEM=="net", SYSFS{addr_len}=="6", SYSFS{address}!="00:00:00:00:00:00", RUN+="dhcp-helper %k" # "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'" +ACTION=="remove", SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-devices/ifdown %k" Modified: branches/6.2/packages/udev/Makefile =================================================================== --- branches/6.2/packages/udev/Makefile 2006-09-08 16:10:27 UTC (rev 1724) +++ branches/6.2/packages/udev/Makefile 2006-09-08 16:17:55 UTC (rev 1725) @@ -40,7 +40,7 @@ make DESTDIR=/ EXTRAS="`echo extras/*/`" install cp $(CONFDIR)/[0-9]* /etc/udev/rules.d/ echo 'ACTION=="add", BUS=="pci", SYSFS{class}=="0x030000", RUN+="detect-video"' >/etc/udev/rules.d/30-video.rules - install -m755 ../detect-video /lib/udev + install -m755 ../detect-video ../dhcp-helper /lib/udev install -m644 ../50-network.rules /etc/udev/rules.d/ install -m644 -D docs/writing_udev_rules/index.html \ /usr/share/doc/$(DIR)/index.html Added: branches/6.2/packages/udev/dhcp-helper =================================================================== --- branches/6.2/packages/udev/dhcp-helper (rev 0) +++ branches/6.2/packages/udev/dhcp-helper 2006-09-08 16:17:55 UTC (rev 1725) @@ -0,0 +1,16 @@ +#!/bin/sh + +INTERFACE=$1 +FILE=/etc/sysconfig/network-devices/ifconfig.${INTERFACE} +if [ -f ${FILE} ] || [ -d ${FILE} ] ; then + exit 0 +fi + +cat >${FILE} <<"EOF" +ONBOOT="yes" +SERVICE="dhcpcd" +DHCP_START="-t 20" +DHCP_STOP="-k" +EOF + +/etc/sysconfig/network-devices/ifup ${INTERFACE} >/dev/null 2>/dev/null & -- http://linuxfromscratch.org/mailman/listinfo/livecd FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
