cvs commit: BLFS/packages/d dhcpcd-config.xml

markh at linuxfromscratch.org markh at linuxfromscratch.org
Mon Apr 29 15:51:30 PDT 2002


markh       02/04/29 15:51:30

  Modified:    .        index.xml
               chapter01 changelog.xml
               chapter06 dhcp.xml dhcpclient.xml
               packages/d dhcpcd-config.xml
  Log:
  Update DHCP scripting
  
  Revision  Changes    Path
  1.71      +2 -2      BLFS/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/index.xml,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- index.xml	28 Apr 2002 23:42:31 -0000	1.70
  +++ index.xml	29 Apr 2002 22:51:30 -0000	1.71
  @@ -4,8 +4,8 @@
   
   <!ENTITY book SYSTEM "book/book.xml">
   
  -<!ENTITY version "20020428">
  -<!ENTITY releasedate "April 28th, 2002">
  +<!ENTITY version "20020429">
  +<!ENTITY releasedate "April 29th, 2002">
   <!ENTITY maintainer-fullname "Mark Hymers">
   <!ENTITY maintainer-firstname "Mark">
   <!ENTITY maintainer-address "markh at linuxfromscratch.org">
  
  
  
  1.71      +3 -0      BLFS/chapter01/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/chapter01/changelog.xml,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- changelog.xml	28 Apr 2002 23:42:31 -0000	1.70
  +++ changelog.xml	29 Apr 2002 22:51:30 -0000	1.71
  @@ -10,6 +10,9 @@
   
   <itemizedlist>
   
  +<listitem><para>April 29th, 2002 [markh]: Chapter 06 - Add DHCP_STOP
  +variable to DHCP scripts.</para></listitem>
  +
   <listitem><para>April 28th, 2002 [markh]: Chapter 04 - Add
   imlib.</para></listitem>
   
  
  
  
  1.6       +18 -1     BLFS/chapter06/dhcp.xml
  
  Index: dhcp.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/chapter06/dhcp.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- dhcp.xml	20 Apr 2002 21:06:36 -0000	1.5
  +++ dhcp.xml	29 Apr 2002 22:51:30 -0000	1.6
  @@ -48,7 +48,24 @@
   <filename>/etc/sysconfig/network-devices/ifconfig.eth0</filename> file
   (or the appropriate one for the interface you are running DHCP on)
   you created earlier by adding the appropriate <userinput>DHCP_PROG
  -</userinput> and <userinput>DHCP_OPT</userinput> values.</para>
  +</userinput>, <userinput>DHCP_START</userinput> and
  +<userinput>DHCP_STOP</userinput> values.</para>
  +
  +<para>Then create the <filename>/etc/dhclient.conf</filename> using the
  +following command:</para>
  +
  +<para><screen><userinput>cat > /etc/dhclient.conf <<
  +"EOF"</userinput>
  +# dhclient.conf
  +
  +interface "eth0"{
  +prepend domain-name-servers 127.0.0.1;
  +request subnet-mask, broadcast-address, time-offset, routers,
  +        domain-name, domain-name-servers, host-name;
  +require subnet-mask, domain-name-servers;
  +}
  +# end dhclient.conf
  +<userinput>EOF</userinput></screen></para>
   
   </sect1>
   
  
  
  
  1.2       +12 -6     BLFS/chapter06/dhcpclient.xml
  
  Index: dhcpclient.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/chapter06/dhcpclient.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- dhcpclient.xml	20 Apr 2002 21:06:36 -0000	1.1
  +++ dhcpclient.xml	29 Apr 2002 22:51:30 -0000	1.2
  @@ -32,14 +32,20 @@
   
   <para>Now you can create the appropriate <filename>ifconfig.eth0</filename> 
   file with the following commands (note that this will overwrite any
  -existing file):
  -<screen><userinput>cd /etc/sysconfig/network-devices &&
  +existing file):</para>
  +
  +<para><screen><userinput>cd /etc/sysconfig/network-devices &&
   cat > ifconfig.eth0 << "EOF"</userinput>
   ONBOOT=yes
   DHCP_PROG=<path to dhcp>
  -DHCP_OPT=<optional parameters>
  +DHCP_START=<start parameters>
  +DHCP_STOP=<stop parameter>
   <userinput>EOF</userinput></screen></para>
   
  +<para>Review the appropriate manpages for parameters; for example, the
  +stop parameter for dhcpcd is '-k', while the stop parameter for dhclient
  +is '-r'.</para>
  +
   <para>You then need to create DHCP specific scripts.  First, the
   <filename>ifup-eth0</filename> script:</para>
   
  @@ -52,7 +58,7 @@
   
   echo "Bringing up the eth0 interface..."
   modprobe eth0
  -loadproc $DHCP_PROG $DHCP_OPT
  +loadproc $DHCP_PROG $DHCP_START
   <userinput>EOF</userinput></screen></para>
   
   <para>Then the <filename>ifdown-eth0</filename> script:</para>
  @@ -65,8 +71,8 @@
   source $network_devices/ifconfig.eth0 || exit
   
   echo "Bringing down the eth0 interface..."
  -ifconfig eth0 down
  -killproc $DHCP_PROG
  +$DHCP_PROG $DHCP_STOP
  +evaluate_retval
   <userinput>EOF</userinput></screen></para>
   
   <para>Finally, we need to make these scripts executable:</para>
  
  
  
  1.3       +2 -1      BLFS/packages/d/dhcpcd-config.xml
  
  Index: dhcpcd-config.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/packages/d/dhcpcd-config.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- dhcpcd-config.xml	20 Apr 2002 21:06:36 -0000	1.2
  +++ dhcpcd-config.xml	29 Apr 2002 22:51:30 -0000	1.3
  @@ -11,7 +11,8 @@
   <filename>/etc/sysconfig/network-devices/ifconfig.eth0</filename> file
   (or the appropriate one for the interface you are running DHCP on)
   you created earlier by adding the appropriate <userinput>DHCP_PROG
  -</userinput> and <userinput>DHCP_OPT</userinput> values.</para>
  +</userinput>, <userinput>DHCP_START</userinput> and
  +<userinput>DHCP_STOP</userinput> values.</para>
   
   </sect4>
   
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-book' in the subject header of the message



More information about the blfs-book mailing list