Ignore:
Timestamp:
06/11/2016 05:26:20 AM (8 years ago)
Author:
DJ Lucas <dj@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
cec6657e
Parents:
a9e71e2
Message:

[Systemd merge] - Chapter 16

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@17478 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • networking/netprogs/wpa_supplicant.xml

    ra9e71e2 r7b478500  
    215215install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
    216216
     217    <para revision="systemd">
     218      Install the <application>systemd</application> support files by
     219      running the following command as the <systemitem
     220      class="username">root</systemitem> user:
     221    </para>
     222
     223<screen role="root" revision="systemd"><userinput>install -v -m644 systemd/*.service /lib/systemd/system/</userinput></screen>
     224
    217225    <para>
    218226      If you have built <application>WPA Supplicant</application> with
     
    228236                 /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
    229237
     238    <para revision="systemd">
     239      Additionally, enable the <filename>wpa_supplicant.service</filename>
     240      so that <application>systemd</application> can properly activate the
     241      <application>D-Bus</application> service. Note that the
     242      per-connection service and the D-Bus service cannot be enabled
     243      at the same time. Run the following command as the
     244      <systemitem class="username">root</systemitem> user:
     245    </para>
     246
     247<screen role="root" revision="systemd"><userinput>systemctl enable wpa_supplicant</userinput></screen>
     248
    230249    <para>
    231250      If you have built the <application>WPA Supplicant</application> GUI
     
    258277      <title>Config File</title>
    259278
    260       <para>
     279      <para revision="sysv">
    261280        <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
    262281      </para>
    263282
    264       <indexterm zone="wpa_supplicant wpa_supplicant-config">
     283      <para revision="systemd">
     284        <filename>/etc/wpa_supplicant/wpa_supplicant-*.conf</filename>
     285      </para>
     286
     287      <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="sysv">
    265288        <primary
    266289        sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
    267290      </indexterm>
    268291
     292      <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="systemd">
     293        <primary
     294        sortas="e-etc-wpa_supplicant-wpa_supplicant-star.conf">/etc/wpa_supplicant/wpa_supplicant-*.conf</primary>
     295      </indexterm>
     296
    269297    </sect3>
    270298
     
    274302      <para>
    275303        To connect to an access point that uses a password, you need to put
    276         the pre-shared key in <filename>
    277         /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
     304        the pre-shared key in
     305        <phrase revision="sysv"><filename>
     306        /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.</phrase>
     307        <phrase revision="systemd"><filename>
     308        /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.</phrase>
    278309        SSID is the string that the access point/router transmits to
    279310        identify itself. Run the following command as the
     
    281312      </para>
    282313
    283 <screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
     314<screen role="root" revision="sysv"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
     315
     316<screen role="root" revision="systemd"><userinput>install -v -dm755 /etc/wpa_supplicant &amp;&amp;
     317wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
    284318
    285319      <para>
    286         <filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
    287         </filename> can hold the details of several access points. When
     320        <phrase revision="sysv"><filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf </filename></phrase>
     321        <phrase revision="systemd"><filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename></phrase>
     322        can hold the details of several access points. When
    288323        <command>wpa_supplicant</command> is started, it will scan for the
    289324        SSIDs it can see and choose the appropriate password to connect.
     
    292327      <para>
    293328        If you want to connect to an access point that isn't password
    294         protected, put an entry like this in <filename>
    295         /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
     329        protected, put an entry like this in
     330        <phrase revision="sysv"><filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename></phrase>
     331        <phrase revision="systemd"><filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename></phrase>.
    296332        Replace "Some-SSID" with the SSID of the access point/router.
    297333      </para>
     
    314350      <title>Connecting to an Access Point</title>
    315351
    316       <para id="wpa-service">
     352      <para id="wpa-service" revision="sysv">
    317353        If you want to configure network interfaces at boot using
    318354        <command>wpa_supplicant</command>, you need to install the
    319355        <filename>/lib/services/wpa</filename> script
    320         included in <xref linkend="bootscripts" revision="sysv"/>
    321         <xref linkend="systemd-units" revision="systemd"/> package:
    322       </para>
    323 
    324 <screen role="root"><userinput>make install-service-wpa</userinput></screen>
    325 
    326       <indexterm zone="wpa_supplicant wpa-service">
     356        included in <xref linkend="bootscripts"/> package:
     357      </para>
     358
     359<screen role="root" revision="sysv"><userinput>make install-service-wpa</userinput></screen>
     360
     361      <indexterm zone="wpa_supplicant wpa-service" revision="sysv">
    327362        <primary sortas="f-wpa">wpa</primary>
    328363      </indexterm>
    329364
    330       <para>
     365      <para revision="sysv">
    331366        If your router/access point uses DHCP to allocate IP addresses, you
    332367        can install <xref linkend="dhcp"/> client and use it to
     
    337372      </para>
    338373
    339 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
     374<screen role="root" revision="sysv"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
    340375<literal>ONBOOT="yes"
    341376IFACE="<replaceable>wlan0</replaceable>"
     
    358393EOF</userinput></screen>
    359394
    360       <para>
     395      <para revision="sysv">
    361396        If you prefer <xref linkend="dhcpcd"/> instead of
    362397        <xref linkend="dhcp"/> client, then create the
     
    366401      </para>
    367402
    368 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
     403<screen role="root" revision="sysv"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
    369404<literal>ONBOOT="yes"
    370405IFACE="<replaceable>wlan0</replaceable>"
     
    379414EOF</userinput></screen>
    380415
    381       <para>
     416      <para revision="sysv">
    382417        Alternatively, if you use static addresses on your local network,
    383418        then create the
     
    387422      </para>
    388423
    389 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
     424<screen role="root" revision="sysv"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
    390425<literal>ONBOOT="yes"
    391426IFACE="<replaceable>wlan0</replaceable>"
     
    402437EOF</userinput></screen>
    403438
     439      <para revision="systemd">
     440        There are 3 types of <application>systemd</application> units
     441        that were installed:
     442      </para>
     443
     444      <itemizedlist spacing="compact" revision="systemd">
     445        <listitem>
     446          <para>
     447            wpa_supplicant@.service
     448          </para>
     449        </listitem>
     450        <listitem>
     451          <para>
     452            wpa_supplicant-nl80211@.service
     453          </para>
     454        </listitem>
     455        <listitem>
     456          <para>
     457            wpa_supplicant-wired@.service
     458          </para>
     459        </listitem>
     460      </itemizedlist>
     461
     462      <para revision="systemd">
     463        The only difference between 3 of them is what driver
     464        is used for connecting (-D option). The first one uses
     465        the default driver, the second one uses the nl80211
     466        driver and the third one uses the wired driver.
     467      </para>
     468
    404469      <para>
    405470        You can connect to the wireless access point by
     
    408473      </para>
    409474
    410 <screen role="root"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
    411 
    412       <para>
     475<screen role="root" revision="sysv"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
     476
     477      <para revision="sysv">
    413478        Replace <replaceable>wlan0</replaceable> with the correct
    414479        wireless interface and <replaceable>wifi0</replaceable>
     
    418483        to have identical names, ie both contain
    419484        <replaceable>wifi0</replaceable> in their name.
     485      </para>
     486
     487<screen role="root" revision="systemd"><userinput>systemctl start wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
     488
     489      <para revision="systemd">
     490        To connect to the wireless access point at
     491        boot, simply enable the appropriate
     492        <command>wpa_supplicant</command> service
     493        by running the following command as the
     494        <systemitem class="username">root</systemitem> user:
     495      </para>
     496
     497<screen role="root" revision="systemd"><userinput>systemctl enable wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
     498
     499      <para revision="systemd">
     500        Depending on your setup, you can replace the
     501        <filename>wpa_supplicant@.service</filename>
     502        with any other listed above.
     503      </para>
     504
     505      <para revision="systemd">
     506        To assign a network address to your wireless interface, consult the
     507        <ulink url="&lfs-root;/chapter07/network.html">General Network Configuration</ulink>
     508        page in LFS.
    420509      </para>
    421510
Note: See TracChangeset for help on using the changeset viewer.