Changeset dec19e9


Ignore:
Timestamp:
10/26/2014 10:09:24 PM (10 years ago)
Author:
Krejzi <krejzi@…>
Branches:
krejzi/svn
Children:
da4ed49
Parents:
34eaf20
Message:

Netprogs conversion.

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

Files:
1 deleted
2 edited
7 moved

Legend:

Unmodified
Added
Removed
  • introduction/welcome/changelog.xml

    r34eaf20 rdec19e9  
    5252        </listitem>
    5353        <listitem>
     54          <para>[krejzi] - Removed netfs instructions.</para>
     55        </listitem>
     56        <listitem>
     57          <para>[krejzi] - Converted CIFS-Utils, NFS-Utils, NTP, rpcbind. RSync, Samba and WPA_Supplicant instructions to work on systemd setups.</para>
     58        </listitem>
     59        <listitem>
    5460          <para>[krejzi] - Added geoclue-2.1.10, libnice-0.1.8 and uhttpmock-0.3.1.</para>
    5561        </listitem>
     
    5864        </listitem>
    5965        <listitem>
    60           <para>[krejzi] - Converted Acpid, At, AutoFS, BlueZ, Colord, FCron, GPM, Sysstat, UDisks and UDisks2 instructions to work on systemd setups..</para>
     66          <para>[krejzi] - Converted Acpid, At, AutoFS, BlueZ, Colord, FCron, GPM, Sysstat, UDisks and UDisks2 instructions to work on systemd setups.</para>
    6167        </listitem>
    6268        <listitem>
     
    136142        </listitem>
    137143        <listitem>
     144          <para>[krejzi] - Removed random instructions.</para>
     145        </listitem>
     146        <listitem>
    138147          <para>[krejzi] - Adjusted Postlfs Configuration for use with LFS systemd.</para>
    139148        </listitem>
  • networking/netprogs/cifsutils-systemd.xml

    r34eaf20 rdec19e9  
    6666      <xref linkend="talloc"/>,
    6767      <xref linkend="samba"/>, and
    68       <ulink url="http://people.redhat.com/sgrubb/libcap-ng/">libcap-ng</ulink> or
    69       <xref linkend="libcap-pam"/>
     68      <ulink url="http://people.redhat.com/sgrubb/libcap-ng/">libcap-ng</ulink>
    7069    </para>
    7170
     
    9998    commands:</para>
    10099
    101 <screen><userinput>./configure --prefix=/usr \
    102             --disable-pam \
    103             --disable-systemd &amp;&amp;
     100<screen><userinput>./configure --prefix=/usr --disable-pam &amp;&amp;
    104101make</userinput></screen>
    105102
     
    115112      <title>Command Explanations</title>
    116113
    117           <para><parameter>--disable-pam</parameter>: Do not build PAM support.
    118             Remove  it and use <option>--with-pamdir</option> (see below),
     114          <para>
     115            <parameter>--disable-pam</parameter>: This switch disables
     116            PAM support. Replace it with
     117            <option>--with-pamdir=/lib/security</option>,
    119118            if <xref linkend="linux-pam"/> is installed and you wish
    120             PAM support.</para>
    121 
    122           <para><parameter>--disable-systemd</parameter>: Disable systemd
    123             specific behavior for <command>mount.cifs</command>. Remove it for
    124             systems running with systemd.</para>
    125 
    126           <para><option>--with-pamdir=/lib/security</option>: Install the PAM
    127             module in
    128             <filename class="directory">/lib/security</filename>.</para>
     119            to build the PAM module.
     120          </para>
    129121
    130122  </sect2>
  • networking/netprogs/netprogs.xml

    r34eaf20 rdec19e9  
    2222
    2323  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bridgeutils-systemd.xml"/>
    24   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cifsutils.xml"/>
     24  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cifsutils-systemd.xml"/>
    2525  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncftp.xml"/>
    2626  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="net-tools.xml"/>
    27   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="nfs-utils.xml"/>
    28   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="netfs.xml"/>
    29   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ntp.xml"/>
    30   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rpcbind.xml"/>
    31   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rsync.xml"/>
    32   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="samba.xml"/>
     27  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="nfs-utils-systemd.xml"/>
     28  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ntp-systemd.xml"/>
     29  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rpcbind-systemd.xml"/>
     30  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rsync-systemd.xml"/>
     31  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="samba-systemd.xml"/>
    3332  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wget.xml"/>
    3433  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wireless-tools.xml"/>
    35   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wpa_supplicant.xml"/>
     34  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wpa_supplicant-systemd.xml"/>
    3635  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="othernetprogs.xml"/>
    3736
  • networking/netprogs/nfs-utils-systemd.xml

    r34eaf20 rdec19e9  
    7373      <xref linkend="mitkrb"/> or
    7474      <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libgssapi</ulink>, and
    75       <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">librpcsecgss</ulink> (for GSS and RPC security support) and
    76       <xref linkend="libcap-pam"/>
     75      <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">librpcsecgss</ulink> (for GSS and RPC security support)
    7776    </para>
    7877
     
    196195
    197196      <sect4 id="nfs-utils-server-init">
    198         <title>Boot Script</title>
    199 
    200         <para>Install the <filename>/etc/rc.d/init.d/nfs-server</filename>
    201         init script included in the <xref linkend="bootscripts"/> package
    202         to start the server at boot.</para>
     197        <title>Systemd Units</title>
     198
     199        <para>
     200          To start the NFS server daemons at boot,
     201          install the systemd units from the <xref linkend="bootscripts"/>
     202          package by running the following command as the
     203          <systemitem class="username">root</systemitem> user:
     204        </para>
    203205
    204206<screen role="root"><userinput>make install-nfs-server</userinput></screen>
     
    208210        </indexterm>
    209211
    210         <para>Now create the <filename>/etc/sysconfig/nfs-server</filename>
    211         configuration file:</para>
    212 
    213 <screen role="root"><userinput>cat &gt; /etc/sysconfig/nfs-server &lt;&lt; "EOF"
    214 <literal>PORT="2049"
    215 PROCESSES="8"
    216 QUOTAS="no"
    217 KILLDELAY="10"</literal>
    218 EOF</userinput></screen>
    219 
    220         <note><para>The above parameters may be optionally placed in
    221         <filename>/etc/sysconfig/rc.site</filename>.</para></note>
     212        <para>You can edit the <filename>/etc/default/nfs-utils</filename>
     213        file to change the startup options for NFS daemons. Defaults should
     214        be fine for most use cases.</para>
    222215
    223216        <indexterm zone="nfs-utils nfs-utils-server-init">
    224           <primary
    225           sortas="e-etc-sysconfig-nfs-server">/etc/sysconfig/nfs-server</primary>
     217          <primary sortas="e-etc-default-nfs-utils">/etc/default/nfs-utils</primary>
    226218        </indexterm>
    227219
     
    284276
    285277      <sect4  id="nfs-utils-client-init">
    286         <title>Boot Script</title>
    287 
    288         <note><para>The following boot script is not required if the
    289         nfs-server script is installed.</para></note>
    290 
    291         <para>Install the <filename>/etc/rc.d/init.d/nfs-client</filename> init
    292         script included in the <xref linkend="bootscripts"/> package to start
    293         the client services at boot.</para>
     278        <title>Systemd Units</title>
     279
     280        <note><para>The following systemd unis are not required if the
     281        nfs-server units were previously installed.</para></note>
     282
     283        <para>
     284          To start the NFS client services at boot,
     285          install the systemd units from the <xref linkend="bootscripts"/>
     286          package by running the following command as the
     287          <systemitem class="username">root</systemitem> user:
     288        </para>
    294289
    295290<screen role="root"><userinput>make install-nfs-client</userinput></screen>
     
    297292        <indexterm zone="nfs-utils nfs-utils-client-config">
    298293          <primary sortas="f-nfs-client">nfs-client</primary>
    299         </indexterm>
    300 
    301         <para>To automatically mount <systemitem
    302         class="filesystem">nfs</systemitem> filesystems, clients will also need
    303         to install the <filename>netfs</filename> bootscript as described in
    304         <xref linkend="postlfs-config-netfs"/>.</para>
    305 
    306         <indexterm zone="nfs-utils nfs-utils-client-config">
    307           <primary sortas="f-netfs">netfs</primary>
    308294        </indexterm>
    309295
  • networking/netprogs/ntp-systemd.xml

    r34eaf20 rdec19e9  
    6363    <bridgehead renderas="sect4">Optional</bridgehead>
    6464    <para role="optional">
    65       <xref linkend="libcap-pam"/>,
    66       <xref linkend="openssl"/>, and
     65      <xref linkend="openssl"/> and
    6766      <ulink url="http://www.thrysoee.dk/editline/">libedit</ulink>
    6867    </para>
     
    181180      and update the time each time <command>ntpd</command> is scheduled.</para>
    182181
    183       <para>If you choose Option one, then install the
    184       <filename>/etc/rc.d/init.d/ntp</filename>
    185       init script included in the
    186       <xref linkend="bootscripts"/> package.</para>
     182      <para>
     183        To start the <command>ntpd</command> daemon at boot,
     184        install the systemd unit from the <xref linkend="bootscripts"/>
     185        package by running the following command as the
     186        <systemitem class="username">root</systemitem> user:
     187      </para>
    187188
    188189      <indexterm zone="ntp ntp-init">
     
    197198
    198199<screen><literal>ntpd -q</literal></screen>
    199 
    200       <para>Execute the following command if you would like to set the
    201       hardware clock to the current system time at shutdown and reboot:</para>
    202 
    203 <screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &amp;&amp;
    204 ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
    205 
    206       <para>The other way around is already set up by LFS.</para>
    207200
    208201    </sect3>
  • networking/netprogs/rpcbind-systemd.xml

    r34eaf20 rdec19e9  
    107107
    108108    <sect3 id="rpcbind-init">
    109       <title>Boot Script</title>
     109      <title>Systemd Units</title>
    110110
    111       <para>Install the <filename>/etc/rc.d/init.d/rpcbind</filename> init script
    112       included in the <xref linkend="bootscripts"/> package.</para>
     111      <para>
     112        To start the <command>rpcbind</command> daemon at boot,
     113        install the systemd unit from the <xref linkend="bootscripts"/>
     114        package by running the following command as the
     115        <systemitem class="username">root</systemitem> user:
     116      </para>
    113117
    114118      <indexterm zone="rpcbind rpcbind-init">
  • networking/netprogs/rsync-systemd.xml

    r34eaf20 rdec19e9  
    165165
    166166    <sect3 id="rsync-init">
    167       <title>Boot Script</title>
     167      <title>Systemd Units</title>
    168168
    169169      <para>Note that you only want to start the
    170170      <application>rsync</application> server if you want to provide an
    171171      <application>rsync</application> archive on your local machine.
    172       You don't need this script to run the
     172      You don't need this unit to run the
    173173      <application>rsync</application> client.</para>
    174174
    175       <para>Install the <filename>/etc/rc.d/init.d/rsyncd</filename> init
    176       script included in the
    177       <xref linkend="bootscripts"/> package.</para>
     175      <para>
     176        To start the <command>rsync</command> daemon at boot,
     177        install the systemd units from the <xref linkend="bootscripts"/>
     178        package by running the following command as the
     179        <systemitem class="username">root</systemitem> user:
     180      </para>
    178181
    179182<screen role="root"><userinput>make install-rsyncd</userinput></screen>
     183
     184      <note>
     185        <para>
     186          This package comes with two types of units: A service file and a socket file.
     187          The service file will start rsync daemon once at boot and it will keep running until the
     188          system shuts down. The socket file will make systemd listen on rsync port (Default 873, needs
     189          to be edited for anything else) and will start rsync daemon when something tries to connect
     190          to that port and stop the daemon when the connection is terminated. This is
     191          called socket activation.
     192
     193          By default, the first method is used - rsync daemon is started at boot and stopped at shutdown.
     194          If the socket method is desired, you need to run as the
     195          <systemitem class="username">root</systemitem> user:
     196
     197<screen role="root"><userinput>systemctl stop rsyncd &amp;&amp;
     198systemctl disable rsyncd &amp;&amp;
     199systemctl enable rsyncd.socket &amp;&amp;
     200systemctl start rsyncd.socket</userinput></screen>
     201
     202          Note that socket method is only useful for remote backups. For local backups you'll need the
     203          service method.
     204        </para>
     205      </note>
    180206
    181207    </sect3>
  • networking/netprogs/samba-systemd.xml

    r34eaf20 rdec19e9  
    7878      <xref linkend="cups"/>,
    7979      <xref linkend="gnutls"/>,
    80       <xref linkend="libcap-pam"/>,
    8180      <xref linkend="libgpg-error"/>,
    8281      <xref linkend="linux-pam"/>,
     
    104103    <note>
    105104      <para>If you wish to run the test suite after the binaries are built,
    106       you must add the <option>-/-enable-socket-wrapper</option>
    107       and <option>-/-enable-selftest</option> parameters to
     105      you must add the <option>--enable-socket-wrapper</option>
     106      and <option>--enable-selftest</option> parameters to
    108107      the <command>configure</command> script below. You may want to run
    109       <command>configure</command> with the <option>-/-help</option> parameter
     108      <command>configure</command> with the <option>--help</option> parameter
    110109      first. There may be other parameters needed to take advantage of
    111110      optional dependencies.</para>
    112111    </note>
     112
     113    <para>Fix a build failure when building on a system with
     114    <application>systemd</application> installed:</para>
     115
     116<screen><userinput>sed "s:systemd-daemon:systemd:g" -i wscript lib/util/wscript_build</userinput></screen>
    113117
    114118    <para>Install <application>Samba</application> by running the following
     
    121125    --with-piddir=/run/samba            \
    122126    --with-pammodulesdir=/lib/security  \
    123     --without-systemd                   \
    124127    --enable-fhs                        \
    125128    --enable-nss-wrapper                &amp;&amp;
     
    130133    limitation to 108 characters of the path length of a unix named pipe socket
    131134    may be the cause of errors, so that over 1/3 of the tests might fail. For
    132     this reason, the switch <option>-/-with-selftest-prefix=/tmp/quick</option>
     135    this reason, the switch <option>--with-selftest-prefix=/tmp/quick</option>
    133136    (or another path with small number of characters) can be used with
    134137    configure. Even so, the
     
    181184    <para><parameter>--enable-nss-wrapper</parameter>: Builds the nss-wrapper
    182185    library.</para>
    183 
    184     <para><parameter>--without-systemd</parameter>: Disable
    185     <application>systemd</application> integration, which is not part of
    186     LFS/BLFS. If you use <application>systemd</application>, replace by
    187     <parameter>--with-systemd</parameter>.</para>
    188186<!--
    189187    <para><option>-/-enable-socket-wrapper</option> and
     
    405403
    406404      <sect4 id="samba-init">
    407         <title>Boot Script</title>
    408 
    409         <para>For your convenience, boot scripts have been provided for
    410         <application>Samba</application>. There are two included in the
    411         <xref linkend="bootscripts"/> package. The first,
    412         <filename>samba</filename>, will start the <command>smbd</command>
    413         and <command>nmbd</command> daemons needed to provide SMB/CIFS
    414         services. The second script, <filename>winbind</filename>, starts
    415         the <command>winbindd</command> daemon, used for providing Windows
    416         domain services to Linux clients.</para>
    417 
    418         <indexterm zone="samba samba-init">
    419           <primary sortas="f-samba">samba</primary>
    420         </indexterm>
    421 
    422         <indexterm zone="samba samba-init">
    423           <primary sortas="f-winbind">winbind</primary>
    424         </indexterm>
     405        <title>Systemd Units</title>
    425406
    426407        <para>The default <application>Samba</application> installation uses the
     
    438419    -s /bin/false -u 99 nobody</userinput></screen>
    439420
    440         <para>Install the <filename>samba</filename> script with the following
    441         command issued as the <systemitem class="username">root</systemitem>
    442         user:</para>
     421        <para>
     422          To start the <application>Samba</application> daemons at boot,
     423          install the systemd units from the <xref linkend="bootscripts"/>
     424          package by running the following command as the
     425          <systemitem class="username">root</systemitem> user:
     426        </para>
     427
     428        <indexterm zone="samba samba-init">
     429          <primary sortas="f-samba">samba</primary>
     430        </indexterm>
    443431
    444432<screen role="root"><userinput>make install-samba</userinput></screen>
    445433
    446         <para>If you also need the <filename>winbindd</filename>
    447         script to resolve names from Windows clients, run:</para>
     434        <para>
     435          To start the <command>winbindd</command> daemon at boot,
     436          install the systemd unit from the <xref linkend="bootscripts"/>
     437          package by running the following command as the
     438          <systemitem class="username">root</systemitem> user:
     439        </para>
     440
     441        <indexterm zone="samba samba-init">
     442          <primary sortas="f-winbindd">winbindd</primary>
     443        </indexterm>
    448444
    449445<screen role="root"><userinput>make install-winbindd</userinput></screen>
     446
     447        <note>
     448          <para>
     449            This package comes with two types of units: A service file and a socket file.
     450            The service file will start smbd daemon once at boot and it will keep running until the
     451            system shuts down. The socket file will make systemd listen on smbd port (Default 445, needs
     452            to be edited for anything else) and will start smbd daemon when something tries to connect
     453            to that port and stop the daemon when the connection is terminated. This is
     454            called socket activation.
     455
     456            By default, the first method is used - smbd daemon is started at boot and stopped at shutdown.
     457            If the socket method is desired, you need to run as the
     458            <systemitem class="username">root</systemitem> user:
     459
     460<screen role="root"><userinput>systemctl stop smbd &amp;&amp;
     461systemctl disable smbd &amp;&amp;
     462systemctl enable smbd.socket &amp;&amp;
     463systemctl start smbd.socket</userinput></screen>
     464
     465            Note that only smbd daemon can be socket activated.
     466          </para>
     467        </note>
    450468
    451469       </sect4>
  • networking/netprogs/wpa_supplicant-systemd.xml

    r34eaf20 rdec19e9  
    8787    <bridgehead renderas="sect4">Optional</bridgehead>
    8888    <para role="optional">
    89       <xref linkend="dbus"/>,
    90       <xref linkend="libxml2"/>, and
    9189      <xref linkend="qt4"/>
    9290    </para>
     
    112110      cfg80211 wireless extensions compatibility: Y         [CONFIG_CFG80211_WEXT]
    113111    Generic IEEE 802.11 Networking Stack (mac80211): Y or M [CONFIG_MAC80211]
    114 Device Drivers  --->                         
     112Device Drivers  --->
    115113  Network device support  --->                              [CONFIG_NETDEVICES}
    116114    Wireless LAN  --->                                      [CONFIG_WLAN]</literal></screen>
     
    169167    <para>
    170168      If you wish to use <application>WPA Supplicant</application> with
    171       <xref linkend="NetworkManager"/>, make sure that you have installed
    172       <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add the
    173       following options to the <application>WPA Supplicant</application>
    174       build configuration file by running the following command:
     169      <xref linkend="NetworkManager"/>, add the required options to
     170      the <application>WPA Supplicant</application> build configuration
     171      file by running the following command:
    175172    </para>
    176173
     
    182179
    183180    <para>
     181      First, fix expand the list of parameters that are passed to the
     182      <command>wpa_supplicant</command> when started as a
     183      <application>D-Bus</application> service:
     184    </para>
     185
     186<screen><userinput>sed -e "s@wpa_supplicant -u@&amp; -s -O /var/run/wpa_supplicant@g" -i wpa_supplicant/dbus/*.service.in &amp;&amp;
     187sed -e "s@wpa_supplicant -u@&amp; -s -O /var/run/wpa_supplicant@g" -i wpa_supplicant/systemd/wpa_supplicant.service.in</userinput></screen>
     188
     189    <para>
    184190      Install <application>WPA Supplicant</application> by running the
    185191      following commands:
     
    196202
    197203<screen><userinput>pushd wpa_gui-qt4 &amp;&amp;
    198 qmake wpa_gui.pro &amp;&amp;
     204qmake-qt4 wpa_gui.pro &amp;&amp;
    199205make &amp;&amp;
    200206popd</userinput></screen>
     
    211217install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &amp;&amp;
    212218install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
     219
     220    <para>
     221      Install the <application>systemd</application> support files by
     222      running the following command as the <systemitem
     223      class="username">root</systemitem> user:
     224    </para>
     225
     226<screen role="root"><userinput>install -v -m644 systemd/*.service /lib/systemd/system/</userinput></screen>
    213227
    214228    <para>
     
    226240
    227241    <para>
     242      Additionally, enable the <filename>wpa_supplicant.service</filename> so that
     243      <application>systemd</application> can properly activate the
     244      <application>D-Bus</application> service. Run the following command as the
     245      <systemitem class="username">root</systemitem> user:
     246    </para>
     247
     248<screen role="root"><userinput>systemctl enable wpa_supplicant</userinput></screen>
     249
     250    <para>
    228251      If you have built the <application>WPA Supplicant</application> GUI
    229252      program, install it by running the following commands as the
     
    256279
    257280      <para>
    258         <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
     281        <filename>/etc/wpa_supplicant/wpa_supplicant-*.conf</filename>
    259282      </para>
    260283
    261284      <indexterm zone="wpa_supplicant wpa_supplicant-config">
    262285        <primary
    263         sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
     286        sortas="e-etc-wpa_supplicant-wpa_supplicant-star.conf">/etc/wpa_supplicant/wpa_supplicant-*.conf</primary>
    264287      </indexterm>
    265288
     
    269292      <title>Configuration Information</title>
    270293
     294      <warning>
     295        <para>
     296          You need to replace <replaceable>wlan0</replaceable> with
     297          the correct wireless interface name in the commands below.
     298        </para>
     299      </warning>
     300
    271301      <para>
    272302        To connect to an access point that uses a password, you need to put
    273303        the pre-shared key in <filename>
    274         /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
     304        /etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</filename>.
    275305        SSID is the string that the access point/router transmits to
    276306        identify itself. Run the following command as the
     
    278308      </para>
    279309
    280 <screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
    281 
    282       <para>
    283         <filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
     310<screen role="root"><userinput>install -v -dm755 /etc/wpa_supplicant &amp;&amp;
     311wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</userinput></screen>
     312
     313      <para>
     314        <filename>/etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf
    284315        </filename> can hold the details of several access points. When
    285316        <command>wpa_supplicant</command> is started, it will scan for the
     
    290321        If you want to connect to an access point that isn't password
    291322        protected, put an entry like this in <filename>
    292         /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
     323        /etc/wpa_supplicant/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</filename>.
    293324        Replace "Some-SSID" with the SSID of the access point/router.
    294325      </para>
     
    311342      <title>Connecting to an Access Point</title>
    312343
    313       <para id="wpa-service">
    314         If you want to configure network interfaces at boot using
    315         <command>wpa_supplicant</command>, you need to install the
    316         <filename>/lib/services/wpa</filename> script
    317         included in <xref linkend="bootscripts"/> package:
    318       </para>
    319 
    320 <screen role="root"><userinput>make install-service-wpa</userinput></screen>
    321 
    322       <indexterm zone="wpa_supplicant wpa-service">
    323         <primary sortas="f-wpa">wpa</primary>
    324       </indexterm>
    325 
    326       <para>
    327         If your router/access point uses DHCP to allocate IP addresses, you
    328         can install <xref linkend="dhcp"/> client and use it to
    329         automatically obtain network addresses. Create the
    330         <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
    331         </filename> by running the following command as the
    332         <systemitem class="username">root</systemitem> user:
    333       </para>
    334 
    335 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
    336 <literal>ONBOOT="yes"
    337 IFACE="<replaceable>wlan0</replaceable>"
    338 SERVICE="wpa"
    339 
    340 # Additional arguments to wpa_supplicant
    341 WPA_ARGS=""
    342 
    343 WPA_SERVICE="dhclient"
    344 DHCP_START=""
    345 DHCP_STOP=""
    346 
    347 # Set PRINTIP="yes" to have the script print
    348 # the DHCP assigned IP address
    349 PRINTIP="no"
    350 
    351 # Set PRINTALL="yes" to print the DHCP assigned values for
    352 # IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
    353 PRINTALL="no"</literal>
    354 EOF</userinput></screen>
    355 
    356       <para>
    357         If you prefer <xref linkend="dhcpcd"/> instead of
    358         <xref linkend="dhcp"/> client, then create the
    359         <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
    360         </filename> by running the following command as the
    361         <systemitem class="username">root</systemitem> user:
    362       </para>
    363 
    364 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
    365 <literal>ONBOOT="yes"
    366 IFACE="<replaceable>wlan0</replaceable>"
    367 SERVICE="wpa"
    368 
    369 # Additional arguments to wpa_supplicant
    370 WPA_ARGS=""
    371 
    372 WPA_SERVICE="dhcpcd"
    373 DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
    374 DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
    375 EOF</userinput></screen>
    376 
    377       <para>
    378         Alternatively, if you use static addresses on your local network,
    379         then create the
    380         <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
    381         </filename> by running the following command as the
    382         <systemitem class="username">root</systemitem> user:
    383       </para>
    384 
    385 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
    386 <literal>ONBOOT="yes"
    387 IFACE="<replaceable>wlan0</replaceable>"
    388 SERVICE="wpa"
    389 
    390 # Additional arguments to wpa_supplicant
    391 WPA_ARGS=""
    392 
    393 WPA_SERVICE="ipv4-static"
    394 IP="192.168.1.1"
    395 GATEWAY="192.168.1.2"
    396 PREFIX="24"
    397 BROADCAST="192.168.1.255"</literal>
    398 EOF</userinput></screen>
     344      <para>
     345        There are 3 types of <application>systemd</application> units
     346        that were installed:
     347      </para>
     348
     349      <itemizedlist spacing="compact">
     350        <listitem>
     351          <para>
     352            wpa_supplicant@.service
     353          </para>
     354        </listitem>
     355        <listitem>
     356          <para>
     357            wpa_supplicant-nl80211@.service
     358          </para>
     359        </listitem>
     360        <listitem>
     361          <para>
     362            wpa_supplicant-wired@.service
     363          </para>
     364        </listitem>
     365      </itemizedlist>
     366
     367      <para>
     368        The only difference between 3 of them is what driver
     369        is used for connecting (-D option). The first one uses
     370        the default driver, the second one uses the nl80211
     371        driver and the third one uses the wired driver.
     372      </para>
    399373
    400374      <para>
     
    404378      </para>
    405379
    406 <screen role="root"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
    407 
    408       <para>
    409         Replace <replaceable>wlan0</replaceable> with the correct
    410         wireless interface and <replaceable>wifi0</replaceable>
    411         with desired name for the configuration file. Please note
    412         that <filename>wpa_supplicant-*.conf</filename> and
    413         <filename>ifconfig.*</filename> configuration files need
    414         to have identical names, ie both contain
    415         <replaceable>wifi0</replaceable> in their name.
     380<screen role="root"><userinput>systemctl start wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
     381
     382      <para>
     383        To connect to the wireless access point at
     384        boot, simply enable the appropriate
     385        <command>wpa_supplicant</command> service
     386        by running the following command as the
     387        <systemitem class="username">root</systemitem> user:
     388      </para>
     389
     390<screen role="root"><userinput>systemctl enable wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
     391
     392      <para>
     393        Depending on your setup, you can replace the
     394        <filename>wpa_supplicant@.service</filename>
     395        with any other listed above.
     396      </para>
     397
     398      <para>
     399        To assign a network address to your wireless interface,
     400        consult the <ulink
     401        url="&lfs-root;/chapter07/network.html">General Network Configuration</ulink>
     402        page in LFS.
    416403      </para>
    417404
Note: See TracChangeset for help on using the changeset viewer.