Ignore:
Timestamp:
10/26/2014 01:39:58 PM (10 years ago)
Author:
Krejzi <krejzi@…>
Branches:
krejzi/svn
Children:
b71b5c8
Parents:
8ddd9c79
Message:

Convert networking/connect, bridge-utils and qemu to systemd.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd-ng@14737 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 moved

Legend:

Unmodified
Added
Removed
  • networking/connect/dhcpcd-systemd.xml

    r8ddd9c79 r032be17  
    3939    &lfs76_checked;
    4040
     41    <note>
     42      <para>
     43        Make sure that you disable the <command>systemd-networkd</command> service
     44        or configure it not to manage the interfaces you want to manage with
     45        <application>dhcpcd</application>.
     46      </para>
     47    </note>
     48
    4149    <bridgehead renderas="sect3">Package Information</bridgehead>
    4250    <itemizedlist spacing="compact">
     
    7583  <sect2 role="installation">
    7684    <title>Installation of dhcpcd</title>
     85
     86    <para>
     87      First, silence a lot of warnings caused by using the latest toolchain
     88      by running the following command:
     89    </para>
     90
     91<screen><userinput>sed -i "s:BSD_SOURCE:DEFAULT_SOURCE:g" configure</userinput></screen>
    7792
    7893    <para>Install <application>dhcpcd</application> by running the following
     
    142157      <title>General Configuration Information</title>
    143158
    144       <para>To configure <command>dhcpcd</command>, you need to first install
    145       the network service script,
    146       <filename>/lib/services/dhcpcd</filename>
    147       included in the <xref linkend="bootscripts"/> package
    148       (as user <systemitem class="username">root</systemitem>):</para>
     159      <para>
     160        If you want to configure network interfaces at boot using
     161        <command>dhcpcd</command>, you need to install the
     162        systemd unit included in <xref linkend="bootscripts"/>
     163        package by running the following command as the
     164        <systemitem class="username">root</systemitem> user:
     165      </para>
     166
     167<screen role="root"><userinput>make install-dhcpcd</userinput></screen>
    149168
    150169      <indexterm zone="dhcpcd dhcpcd-init">
    151         <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
     170        <primary sortas="f-dhcpcd">dhcpcd</primary>
    152171      </indexterm>
    153172
    154 <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
    155 
    156       <para>Whenever <command>dhcpcd</command> configures or shuts down
    157       a network interface, it executes hook scripts. For more details
    158       about those scripts, see the <command>dhcpcd-run-hooks</command> and
    159       <command>dhcpcd</command> man pages.</para>
    160 
    161       <para id="dhcpcd-config2">Finally, as the <systemitem
    162       class="username">root</systemitem> user create the
    163       <filename>/etc/sysconfig/ifconfig.eth0</filename>
    164       configuration file using the following commands.  Adjust appropriately
    165       for additional interfaces:</para>
    166 
    167       <indexterm zone="dhcpcd dhcpcd-config2">
    168         <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
    169       </indexterm>
    170 
    171 <screen role='root'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
    172 <literal>ONBOOT="yes"
    173 IFACE="eth0"
    174 SERVICE="dhcpcd"
    175 DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
    176 DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
    177 EOF</userinput></screen>
    178 
    179       <para>For more information on the appropriate <envar>DHCP_START</envar> and
    180       <envar>DHCP_STOP</envar> values, examine the man page for
    181       <command>dhcpcd</command>.</para>
     173      <para>
     174        Whenever <command>dhcpcd</command> configures or shuts down
     175        a network interface, it executes hook scripts. For more details
     176        about those scripts, see the <command>dhcpcd-run-hooks</command> and
     177        <command>dhcpcd</command> man pages.
     178      </para>
    182179
    183180      <note>
    184 
    185         <para id="dhcpcd-config3">The default behavior of
    186         <command>dhcpcd</command> sets the hostname and mtu settings.  It also
    187         overwrites <filename>/etc/resolv.conf</filename> and
    188         <filename>/etc/ntp.conf</filename>.
    189 
    190         These modifications to system files and settings on system
    191         configuration files are done by hooks which are stored in <filename
    192         class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
    193 
    194         Setup <command>dhcpcd</command> by removing or adding hooks from/to
    195         that directory.  The execution of hooks can be disabled by using the
    196         <option>--nohook</option> (<option>-C</option>) command line option or
    197         by the <option>nohook</option> option in the
    198         <filename>/etc/dhcpcd.conf</filename> file.</para>
    199 
    200         <para>Review the <command>dhcpcd</command> man page for switches to add
    201         to the <envar>DHCP_START</envar> value.</para>
    202 
     181        <para id="dhcpcd-config3">
     182          The default behavior of <command>dhcpcd</command> sets the
     183          hostname and mtu settings. It also overwrites
     184          <filename>/etc/resolv.conf</filename> and
     185          <filename>/etc/ntp.conf</filename>.
     186
     187          These modifications to system files and settings on system
     188          configuration files are done by hooks which are stored in
     189          <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
     190
     191          Setup <command>dhcpcd</command> by removing or adding hooks from/to
     192          that directory.  The execution of hooks can be disabled by using the
     193          <option>--nohook</option> (<option>-C</option>) command line option or
     194          by the <option>nohook</option> option in the
     195          <filename>/etc/dhcpcd.conf</filename> file.
     196        </para>
    203197      </note>
    204198
     
    206200        <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
    207201      </indexterm>
    208     </sect3>
    209 
    210     <sect3 id="dhcpcd-init2">
    211       <title>Configuration Information: fixed ip</title>
    212 
    213       <para id="dhcpcd-config4">Although not usual, it is possible that you need
    214         to configure <application>dhcpcd</application> to use a fixed ip. Here,
    215         we give an example. As the
    216         <systemitem class="username">root</systemitem> user create the
    217         <filename>/etc/sysconfig/ifconfig.eth0</filename> configuration file
    218         using the following commands.  Adjust appropriately for additional
    219         interfaces and for the actual ip and router you need:</para>
    220 
    221       <indexterm zone="dhcpcd dhcpcd-config4">
    222         <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
    223       </indexterm>
    224 
    225 <screen role='root'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
    226 <literal>ONBOOT="yes"
    227 IFACE="eth0"
    228 SERVICE="dhcpcd"
    229 DHCP_START="-b -q -S ip_address=192.168.0.10/24 -S routers=192.168.0.1"
    230 DHCP_STOP="-k"</literal>
    231 EOF</userinput></screen>
    232 
    233       <para>You can either use DNS servers in
    234         <filename>/etc/resolv.conf</filename> from another system, your
    235         preferred servers, or just the example
    236         <filename>/etc/resolv.conf.head</filename> file below as is:</para>
    237 
    238 <screen role='root'><userinput>cat &gt; /etc/resolv.conf.head &lt;&lt; "EOF"
    239 <literal># OpenDNS servers
    240 nameserver 208.67.222.222
    241 nameserver 208.67.220.220</literal>
    242 EOF</userinput></screen>
     202
     203      <para>
     204        At this point you can test if <command>dhcpcd</command> is
     205        behaving as expected by running the following command as the
     206        <systemitem class="username">root</systemitem> user:
     207      </para>
     208
     209<screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
     210
     211      <para>
     212        To start <command>dhcpcd</command> on a specific interface
     213        at boot, enable the previously installed systemd unit by
     214        running the following command as the
     215        <systemitem class="username">root</systemitem> user:
     216      </para>
     217
     218<screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
     219
     220      <para>
     221        Replace <replaceable>eth0</replaceable> with the actual interface name.
     222      </para>
    243223
    244224    </sect3>
     
    250230
    251231    <segmentedlist>
    252       <segtitle>Installed Program</segtitle>
    253       <segtitle>Installed Library</segtitle>
    254       <segtitle>Installed Directory</segtitle>
     232      <segtitle>Installed Programs</segtitle>
     233      <segtitle>Installed Libraries</segtitle>
     234      <segtitle>Installed Directories</segtitle>
    255235
    256236      <seglistitem>
    257237        <seg>dhcpcd</seg>
    258         <seg>/lib/dhcpcd/dev/udev.so</seg>
     238        <seg>None</seg>
    259239        <seg>/lib/dhcpcd</seg>
    260240      </seglistitem>
     
    277257      </varlistentry>
    278258
    279       <varlistentry id="dhcpcd-udev">
    280         <term><filename class="libraryfile">udev.so</filename></term>
    281         <listitem>
    282           <para>
    283             add udev support for interface arrival and departure; this is
    284             because udev likes to rename the interface, which it can't do if
    285             dhcpcd grabs it first.
    286           </para>
    287           <indexterm zone="dhcpcd dhcpcd-udev">
    288             <primary sortas="c-dhcpcd-udev">udev.so</primary>
    289           </indexterm>
    290         </listitem>
    291       </varlistentry>
    292 
    293259    </variablelist>
    294260
Note: See TracChangeset for help on using the changeset viewer.