r8908 - in trunk: BOOK BOOK/basicnet/connect BOOK/introduction/welcome bootscripts bootscripts/blfs bootscripts/blfs/services

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Sat Oct 22 07:24:30 PDT 2011


Author: bdubbs
Date: 2011-10-22 08:24:23 -0600 (Sat, 22 Oct 2011)
New Revision: 8908

Added:
   trunk/bootscripts/blfs/services/
   trunk/bootscripts/blfs/services/dhcpcd
Modified:
   trunk/BOOK/basicnet/connect/dhcpcd.xml
   trunk/BOOK/general.ent
   trunk/BOOK/introduction/welcome/changelog.xml
   trunk/bootscripts/Makefile
Log:
Update to dhcpcd-5.2.12

Modified: trunk/BOOK/basicnet/connect/dhcpcd.xml
===================================================================
--- trunk/BOOK/basicnet/connect/dhcpcd.xml	2011-10-21 22:20:11 UTC (rev 8907)
+++ trunk/BOOK/basicnet/connect/dhcpcd.xml	2011-10-22 14:24:23 UTC (rev 8908)
@@ -6,9 +6,9 @@
 
   <!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
   <!ENTITY dhcpcd-download-ftp  "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">
-  <!ENTITY dhcpcd-md5sum        "b9f1ccdaaf23ffea7dd6fd89e932f4ed">
-  <!ENTITY dhcpcd-size          "51 KB">
-  <!ENTITY dhcpcd-buildsize     "0.3 MB">
+  <!ENTITY dhcpcd-md5sum        "832e3cd6bfcaff64e9476e0ff7849e8f">
+  <!ENTITY dhcpcd-size          "76 KB">
+  <!ENTITY dhcpcd-buildsize     "0.9 MB">
   <!ENTITY dhcpcd-time          "less than 0.1 SBU">
 ]>
 
@@ -67,27 +67,23 @@
     <para>Install <application>dhcpcd</application> by running the following
     commands:</para>
 
-<screen><userinput>make PREFIX= \
-      LIBEXECDIR=/lib/dhcpcd \
-      DBDIR=/var/lib/dhcpcd \
-      SYSCONFDIR=/etc/dhcpcd</userinput></screen>
+<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
+            --dbdir=/run             \
+            --sysconfdir=/etc &&
+make</userinput></screen>
 
     <para>This package does not come with a test suite.</para>
 
     <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
 
-<screen><userinput>make PREFIX= \
-      LIBEXECDIR=/lib/dhcpcd \
-      DBDIR=/var/lib/dhcpcd \
-      SYSCONFDIR=/etc/dhcpcd install</userinput></screen>
+<screen><userinput>make install</userinput></screen>
 
     <para>By default, a plain text lease info file isn't created but the
       <application>dhcpcd</application> provides a hook which can be used for creating
       such a file. Install the hook by running the following
       commands as the <systemitem class="username">root</systemitem> user:</para>
 
-<screen><userinput>sed -i "s;/var/lib/dhcpcd-;/var/lib/dhcpcd/dhcpcd-;g" \
-       dhcpcd-hooks/50-dhcpcd-compat &&
+<screen><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &&
 install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
 
   </sect2>
@@ -111,7 +107,7 @@
 
       <para>To configure <command>dhcpcd</command>, you need to first install
       the network service script,
-      <filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
+      <filename>/lib/services/dhcpcd</filename>
       included in the <xref linkend="bootscripts"/> package
       (as user <systemitem class="username">root</systemitem>):</para>
 
@@ -123,33 +119,25 @@
 
       <para>Whenever <command>dhcpcd</command> configures or shuts down
       a network interface, it executes hook scripts. For more details
-      about those scripts, see the <command>dhcpcd-run-hooks</command> as
-      well as the <command>dhcpcd</command> man page.</para>
+      about those scripts, see the <command>dhcpcd-run-hooks</command> and
+      <command>dhcpcd</command> man pages.</para>
 
       <para id="dhcpcd-config2">Finally, as the <systemitem
       class="username">root</systemitem> user create the
-      <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
+      <filename>/etc/sysconfig/ifconfig.eth0</filename>
       configuration file using the following commands.  Adjust appropriately
       for additional interfaces:</para>
 
       <indexterm zone="dhcpcd dhcpcd-config2">
-        <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/.../dhcpcd</primary>
+        <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
       </indexterm>
 
-<screen role='root'><userinput>install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
-cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd << "EOF"
+<screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
 <literal>ONBOOT="yes"
+IFACE="eth0"
 SERVICE="dhcpcd"
 DHCP_START="<replaceable><insert appropriate start options here></replaceable>"
-DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"
-
-# Set PRINTIP="yes" to have the script print
-# the DHCP assigned IP address
-PRINTIP="no"
-
-# Set PRINTALL="yes" to print the DHCP assigned values for
-# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
-PRINTALL="no"</literal>
+DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"</literal>
 EOF</userinput></screen>
 
       <para>For more information on the appropriate <envar>DHCP_START</envar> and
@@ -157,29 +145,30 @@
       <command>dhcpcd</command>.</para>
 
       <note>
-        <para id="dhcpcd-config3">The default behavior of <command>dhcpcd</command>
-        is to overwrite <filename>/etc/resolv.conf</filename>. All modifications on
-        system configuration files like <filename>/etc/resolv.conf</filename>,
-        <filename>/etc/yp.conf</filename> and <filename>/etc/ntp.conf</filename> are
-        done by hooks which are stored in <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
-        Setup <command>dhcpcd</command> by removing or adding hooks from/to that directory.
-        The execution of hooks can be disabled by using the -C command line option.</para>
-        <para>Review the <command>dhcpcd</command> man page for switches to add to the
-        <envar>DHCP_START</envar> value.</para>
+
+        <para id="dhcpcd-config3">The default behavior of
+        <command>dhcpcd</command> sets the hostname and mtu settings.  It also
+        overwrites <filename>/etc/resolv.conf</filename> and
+        <filename>/etc/ntp.conf</filename>. 
+        
+        These modifications to system files and settings on system
+        configuration files are done by hooks which are stored in <filename
+        class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
+        
+        Setup <command>dhcpcd</command> by removing or adding hooks from/to
+        that directory.  The execution of hooks can be disabled by using the
+        <option>--nohook</option> (<option>-C</option>) command line option or
+        by the <option>nohook</option> option in the
+        <filename>/etc/dhcpcd.conf</filename> file.</para> 
+        
+        <para>Review the <command>dhcpcd</command> man page for switches to add
+        to the <envar>DHCP_START</envar> value.</para> 
+        
       </note>
 
       <indexterm zone="dhcpcd dhcpcd-config3">
         <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
       </indexterm>
-<!--  These are not modified by default with version 4 of dhcpcd
-      <indexterm zone="dhcpcd dhcpcd-config3">
-        <primary sortas="e-etc-yp.conf">/etc/yp.conf</primary>
-      </indexterm>
-
-      <indexterm zone="dhcpcd dhcpcd-config3">
-        <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
-      </indexterm>
--->
     </sect3>
 
   </sect2>
@@ -195,7 +184,7 @@
       <seglistitem>
         <seg>dhcpcd</seg>
         <seg>None</seg>
-        <seg>/lib/dhcpcd, /etc/dhcpcd</seg>
+        <seg>/lib/dhcpcd</seg>
       </seglistitem>
     </segmentedlist>
 

Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent	2011-10-21 22:20:11 UTC (rev 8907)
+++ trunk/BOOK/general.ent	2011-10-22 14:24:23 UTC (rev 8908)
@@ -3,13 +3,13 @@
 $Date$
 -->
 
-<!ENTITY day          "21">                   <!-- Always 2 digits -->
+<!ENTITY day          "22">                   <!-- Always 2 digits -->
 <!ENTITY month        "10">                   <!-- Always 2 digits -->
 <!ENTITY year         "2011">
 <!ENTITY copyrightdate "2001-&year;">
 <!ENTITY copyholder   "The BLFS Development Team">
 <!ENTITY version      "svn-&year;&month;&day;">
-<!ENTITY releasedate  "September &day;st, &year;">
+<!ENTITY releasedate  "September &day;nd, &year;">
 <!ENTITY pubdate      "&year;-&month;-&day;"> <!-- metadata req. by TLDP -->
 <!ENTITY blfs-version "svn">                  <!-- svn|[release #] -->
 <!ENTITY lfs-version  "development">          <!-- version|testing|unstable|development] -->
@@ -55,7 +55,7 @@
 <!ENTITY lfs-vim-version              "7.3">
 <!-- End LFS versions -->
 
-<!ENTITY blfs-bootscripts-version     "20111021">
+<!ENTITY blfs-bootscripts-version     "20111022">
 <!ENTITY blfs-bootscripts-download    "&downloads-root;/blfs-bootscripts-&blfs-bootscripts-version;.tar.bz2">
 
 <!ENTITY blfs-wiki                    "http://wiki.&lfs-domainname;/blfs/wiki">
@@ -412,7 +412,7 @@
 
 <!-- Chapter 14 -->
 <!ENTITY dhcp-version                 "3.0.6">
-<!ENTITY dhcpcd-version               "4.0.11">
+<!ENTITY dhcpcd-version               "5.2.12">
 
 <!-- Chapter 15 -->
 <!ENTITY pppoe-version                "3.8">

Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml	2011-10-21 22:20:11 UTC (rev 8907)
+++ trunk/BOOK/introduction/welcome/changelog.xml	2011-10-22 14:24:23 UTC (rev 8908)
@@ -42,6 +42,15 @@
 -->
 
     <listitem>
+      <para>October 22nd, 2011</para>
+      <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Updated dhcpcd-5.2.12.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>October 21st, 2011</para>
       <itemizedlist>
         <listitem>

Modified: trunk/bootscripts/Makefile
===================================================================
--- trunk/bootscripts/Makefile	2011-10-21 22:20:11 UTC (rev 8907)
+++ trunk/bootscripts/Makefile	2011-10-22 14:24:23 UTC (rev 8908)
@@ -1,4 +1,5 @@
 ETCDIR=/etc
+LIBDIR=${DESTDIR}/lib/services
 EXTDIR=${DESTDIR}${ETCDIR}
 MODE=754
 DIRMODE=755
@@ -16,12 +17,13 @@
 
 create-service-dir:
 	install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
+	install -d -m ${DIRMODE} ${LIBDIR}
 
 install-service-dhclient: create-service-dir
 	install -m ${MODE} blfs/sysconfig/network-devices/services/dhclient ${EXTDIR}/sysconfig/network-devices/services
 
 install-service-dhcpcd: create-service-dir
-	install -m ${MODE} blfs/sysconfig/network-devices/services/dhcpcd   ${EXTDIR}/sysconfig/network-devices/services
+	install -m ${MODE} blfs/services/dhcpcd  ${LIBDIR}
 
 install-service-ipx: create-service-dir
 	install -m ${MODE} blfs/sysconfig/network-devices/services/ipx      ${EXTDIR}/sysconfig/network-devices/services

Added: trunk/bootscripts/blfs/services/dhcpcd
===================================================================
--- trunk/bootscripts/blfs/services/dhcpcd	                        (rev 0)
+++ trunk/bootscripts/blfs/services/dhcpcd	2011-10-22 14:24:23 UTC (rev 8908)
@@ -0,0 +1,64 @@
+#!/bin/bash
+# Begin services/dhcpcd
+
+# Origianlly dased upon lfs-bootscripts-1.12 $NETWORK_DEVICES/if{down,up}
+# Rewritten by Nathan Coulson <nathan at linuxfromscratch.org>
+# Adapted for dhcpcd by DJ Lucas <dj at lucasit.com>
+# Update for LFS 7.0 by Bruce Dubbs <bdubbs at linuxfromscratch,org>
+
+# Call with: IFCONFIG=<filename> /lib/services/dhcpcd <IFACE> <up | down>
+
+#$LastChangedBy: bdubbs $
+#$Date: 2005-08-01 13:29:19 -0600 (Mon, 01 Aug 2005) $
+
+. /lib/lsb/init-functions
+. $IFCONFIG
+
+case "$2" in
+    up)
+       log_info_msg "\nStarting dhcpcd on the $1 interface..."
+
+       # Test to see if there is a stale pid file
+       pidfile="/var/run/dhcpcd-$1.pid"
+
+       if [ -f "$pidfile" ]; then
+          ps `cat "$pidfile"` | grep dhcpcd > /dev/null
+
+          if [ $? != 0 ]; then
+             rm -f /var/run/dhcpcd-$1.pid > /dev/null
+          
+          else
+             log_warning_msg "dhcpcd is already running!"
+             exit 2
+          fi
+       fi
+
+       /sbin/dhcpcd $1 $DHCP_START
+       evaluate_retval
+       ;;
+
+     down)
+       log_info_msg "Stoping dhcpcd on the $1 interface..."
+
+       if [ -z "$DHCP_STOP" ]; then
+          killproc -p "${PIDFILE}" /sbin/dhcpcd
+
+       else
+          /sbin/dhcpcd $1 $DHCP_STOP &> /dev/null
+
+          if [ "$?" -eq 1 ]; then
+             log_warning_msg "dhcpcd not running!"
+             exit 2
+          fi
+       fi
+
+       evaluate_retval
+       ;;
+
+     *)
+       echo "Usage: $0 [interface] {up|down}"
+       exit 1
+       ;;
+esac
+
+# End services/dhcpcd




More information about the blfs-book mailing list