Changeset 97a30d62


Ignore:
Timestamp:
02/11/2013 04:22:35 PM (11 years ago)
Author:
Krejzi <krejzi@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
b72d9a4
Parents:
49f0ce04
Message:

Added wpa service configuration to wpa_supplicant p age and few modifications to wpa and dhclient services.

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

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • general.ent

    r49f0ce04 r97a30d62  
    6767<!-- End LFS versions -->
    6868
    69 <!ENTITY blfs-bootscripts-version     "20130204">
     69<!ENTITY blfs-bootscripts-version     "20130211">
    7070<!ENTITY blfs-bootscripts-download    "&downloads-root;/blfs-bootscripts-&blfs-bootscripts-version;.tar.bz2">
    7171
  • introduction/welcome/changelog.xml

    r49f0ce04 r97a30d62  
    4646
    4747    <listitem>
     48      <para>February 11th, 2013</para>
     49      <itemizedlist>
     50        <listitem>
     51          <para>[krejzi] - Added wpa service configuration to
     52          wpa_supplicant instructions.</para>
     53        </listitem>
     54      </itemizedlist>
     55    </listitem>
     56
     57    <listitem>
    4858      <para>February 10th, 2013</para>
    4959      <itemizedlist>
  • networking/netprogs/wpa_supplicant.xml

    r49f0ce04 r97a30d62  
    208208    </para>
    209209
    210 <screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant}               \
    211                  /sbin                                         &amp;&amp;
    212 install -v -m644 doc/docbook/wpa_supplicant.conf.5             \
    213                  /usr/share/man/man5                           &amp;&amp;
    214 install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 \
    215                  /usr/share/man/man8</userinput></screen>
     210<screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /sbin/ &amp;&amp;
     211install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &amp;&amp;
     212install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
    216213
    217214    <para>
     
    224221
    225222<screen role="root"><userinput>install -v -m644 dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
    226                  /usr/share/dbus-1/system-services &amp;&amp;
     223                 /usr/share/dbus-1/system-services/ &amp;&amp;
    227224install -v -m644 dbus/dbus-wpa_supplicant.conf \
    228225                 /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
     
    234231    </para>
    235232
    236 <screen role="root"><userinput>
    237 install -v -m755 wpa_gui-qt4/wpa_gui           /usr/bin/ &amp;&amp;
    238 install -v -m644 doc/docbook/wpa_gui.8         /usr/share/man/man8/ &amp;&amp;
    239 install -v -m644 wpa_gui-qt4/wpa_gui.desktop   /usr/share/applications/ &amp;&amp;
     233<screen role="root"><userinput>install -v -m755 wpa_gui-qt4/wpa_gui /usr/bin/ &amp;&amp;
     234install -v -m644 doc/docbook/wpa_gui.8 /usr/share/man/man8/ &amp;&amp;
     235install -v -m644 wpa_gui-qt4/wpa_gui.desktop /usr/share/applications/ &amp;&amp;
    240236install -v -m644 wpa_gui-qt4/icons/wpa_gui.svg /usr/share/pixmaps/</userinput></screen>
    241237
     
    250246    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    251247      href="../../xincludes/update-desktop-database.xml"/>
     248
    252249  </sect2>
    253250
     
    257254    <sect3 id="wpa_supplicant-config">
    258255      <title>Config File</title>
    259       <para><filename>/etc/wpa_supplicant.conf</filename></para>
     256
     257      <para>
     258        <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
     259      </para>
    260260
    261261      <indexterm zone="wpa_supplicant wpa_supplicant-config">
    262262        <primary
    263         sortas="e-etc-wpa_supplicant.conf">/etc/wpa_supplicant.conf</primary>
     263        sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
    264264      </indexterm>
     265
    265266    </sect3>
    266267
     
    270271      <para>
    271272        To connect to an access point that uses a password, you need to put
    272         the pre-shared key in <filename>/etc/wpa_supplicant.conf</filename>. Use
    273         <command>wpa_passphrase</command> to generate this. SSID is the string
    274         that the access point/router transmits to identify itself. As the
     273        the pre-shared key in <filename>
     274        /etc/sysconfig/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</filename>.
     275        SSID is the string that the access point/router transmits to
     276        identify itself. Run the following command as the
    275277        <systemitem class="username">root</systemitem> user:
    276278      </para>
    277279
    278 <screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant.conf</userinput></screen>
    279 
    280       <para>
    281         <filename>/etc/wpa_supplicant.conf</filename> can hold the details of
    282         several access points. When you run <command>wpa_supplicant</command>
    283         it will scan for the SSIDs it can see and choose the appropriate
    284         password to connect.
     280<screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/sysconfig/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</userinput></screen>
     281
     282      <para>
     283        <filename>/etc/sysconfig/wpa_supplicant-<replaceable>wlan0</replaceable>.conf
     284        </filename> can hold the details of several access points. When
     285        <command>wpa_supplicant</command> is started, it will scan for the
     286        SSIDs it can see and choose the appropriate password to connect.
    285287        </para>
    286288
    287289      <para>
    288290        If you want to connect to an access point that isn't password
    289         protected, put an entry like this in
    290         <filename>/etc/wpa_supplicant.conf</filename>. Replace
    291         "Some-SSID" with the SSID of the access point/router.
     291        protected, put an entry like this in <filename>
     292        /etc/sysconfig/wpa_supplicant-<replaceable>wlan0</replaceable>.conf</filename>.
     293        Replace "Some-SSID" with the SSID of the access point/router.
    292294      </para>
    293295
     
    304306      </para>
    305307
    306       <para>
    307         To use <command>wpa_cli</command> to control the running
    308         <command>>wpa_supplicant</command> daemon, add a control interface to
    309         <filename>/etc/wpa_supplicant.conf</filename> as the
    310         <systemitem class="username">root</systemitem> user:
    311       </para>
    312 
    313 <screen role="root"><userinput>echo ctrl_interface=/run/wpa_supplicant &gt;&gt; /etc/wpa_supplicant.conf</userinput></screen>
    314308    </sect3>
    315309
     
    317311      <title>Connecting to an Access Point</title>
    318312
    319       <para>
    320         If your router/access point uses DHCP to allocate IP addresses you
    321         can install <xref linkend="dhcpcd"/> and use it to connect. As the
     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>wlan0</replaceable>
     331        </filename> by running the following command as the
    322332        <systemitem class="username">root</systemitem> user:
    323333      </para>
    324334
    325 <screen role="root"><userinput>wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
    326 sleep 2 # let it settle
    327 dhcpcd</userinput></screen>
    328 
    329       <para>
    330         Alternatively, you can use static addresses on your local network.
    331         This has the advantage that you can put the hostnames in
    332         <filename>/etc/hosts</filename>. Replace 192.168.1.6 with the static
    333         address you've chosen. Replace 192.168.1.1 with the local IP address of
    334         the access point/router. Run the following commands as the
     335<screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wlan0</replaceable> &lt;&lt; "EOF"
     336<literal>ONBOOT="yes"
     337IFACE="<replaceable>wlan0</replaceable>"
     338SERVICE="wpa"
     339
     340# Additional arguments to wpa_supplicant
     341WPA_ARGS=""
     342
     343WPA_SERVICE="dhclient"
     344DHCP_START=""
     345DHCP_STOP=""
     346
     347# Set PRINTIP="yes" to have the script print
     348# the DHCP assigned IP address
     349PRINTIP="no"
     350
     351# Set PRINTALL="yes" to print the DHCP assigned values for
     352# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
     353PRINTALL="no"</literal>
     354EOF</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>wlan0</replaceable>
     360        </filename> by running the following command as the
    335361        <systemitem class="username">root</systemitem> user:
    336362      </para>
    337363
    338 <screen role="root"><userinput>ip addr add 192.168.1.6 dev wlan0
    339 ip link set wlan0 up
    340 wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
    341 ip route add 192.168.1.1 dev wlan0
    342 ip route add default via 192.168.1.1 dev wlan0</userinput></screen>
     364<screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wlan0</replaceable> &lt;&lt; "EOF"
     365<literal>ONBOOT="yes"
     366IFACE="<replaceable>wlan0</replaceable>"
     367SERVICE="wpa"
     368
     369# Additional arguments to wpa_supplicant
     370WPA_ARGS=""
     371
     372WPA_SERVICE="dhcpcd"
     373DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
     374DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
     375EOF</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>wlan0</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>wlan0</replaceable> &lt;&lt; "EOF"
     386<literal>ONBOOT="yes"
     387IFACE="<replaceable>wlan0</replaceable>"
     388SERVICE="wpa"
     389
     390# Additional arguments to wpa_supplicant
     391WPA_ARGS=""
     392
     393WPA_SERVICE="ipv4-static"
     394IP="192.168.1.1"
     395GATEWAY="192.168.1.2"
     396PREFIX="24"
     397BROADCAST="192.168.1.255"</literal>
     398EOF</userinput></screen>
     399
     400      <para>
     401        You can connect to the wireless access point by
     402        running the following command as the
     403        <systemitem class="username">root</systemitem> user:
     404      </para>
     405
     406<screen role="root"><userinput>ifup <replaceable>wlan0</replaceable></userinput></screen>
     407
     408      <para>
     409        Replace <replaceable>wlan0</replaceable> with the correct
     410        wireless interface.
     411      </para>
    343412
    344413    </sect3>
     414
    345415  </sect2>
    346416
Note: See TracChangeset for help on using the changeset viewer.