Changeset db7d0ff for networking/netprogs
- Timestamp:
- 07/20/2014 06:20:38 PM (10 years ago)
- Branches:
- systemd-11177
- Children:
- 451d81e6
- Parents:
- 6eb5ee1b
- Location:
- networking/netprogs
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
networking/netprogs/netprogs.xml
r6eb5ee1b rdb7d0ff 33 33 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wget.xml"/> 34 34 <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"/>35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wpa_supplicant-systemd.xml"/> 36 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="othernetprogs.xml"/> 37 37 -
networking/netprogs/wpa_supplicant-systemd.xml
r6eb5ee1b rdb7d0ff 87 87 <bridgehead renderas="sect4">Optional</bridgehead> 88 88 <para role="optional"> 89 <xref linkend="dbus"/>,90 <xref linkend="libxml2"/>, and91 89 <xref linkend="qt4"/> 92 90 </para> … … 169 167 <para> 170 168 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: 175 172 </para> 176 173 … … 182 179 183 180 <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@& -s -O /var/run/wpa_supplicant@g" -i wpa_supplicant/dbus/*.service.in && 187 sed -e "s@wpa_supplicant -u@& -s -O /var/run/wpa_supplicant@g" -i wpa_supplicant/systemd/wpa_supplicant.service.in</userinput></screen> 188 189 <para> 184 190 Install <application>WPA Supplicant</application> by running the 185 191 following commands: … … 211 217 install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ && 212 218 install -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> 213 227 214 228 <para> … … 226 240 227 241 <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> 228 251 If you have built the <application>WPA Supplicant</application> GUI 229 252 program, install it by running the following commands as the … … 256 279 257 280 <para> 258 <filename>/etc/ sysconfig/wpa_supplicant-*.conf</filename>281 <filename>/etc/wpa_supplicant/wpa_supplicant-*.conf</filename> 259 282 </para> 260 283 261 284 <indexterm zone="wpa_supplicant wpa_supplicant-config"> 262 285 <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> 264 287 </indexterm> 265 288 … … 269 292 <title>Configuration Information</title> 270 293 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 271 301 <para> 272 302 To connect to an access point that uses a password, you need to put 273 303 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>. 275 305 SSID is the string that the access point/router transmits to 276 306 identify itself. Run the following command as the … … 278 308 </para> 279 309 280 <screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> > /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 && 311 wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> > /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 284 315 </filename> can hold the details of several access points. When 285 316 <command>wpa_supplicant</command> is started, it will scan for the … … 290 321 If you want to connect to an access point that isn't password 291 322 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>. 293 324 Replace "Some-SSID" with the SSID of the access point/router. 294 325 </para> … … 311 342 <title>Connecting to an Access Point</title> 312 343 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 > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "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 > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "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><insert appropriate start options here></replaceable>" 374 DHCP_STOP="-k <replaceable><insert additional stop options here></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 > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "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> 399 373 400 374 <para> … … 404 378 </para> 405 379 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="http://www.linuxfromscratch.org/lfs/view/systemd/chapter07/network.html">General Network Configuration</ulink> 402 page in LFS. 416 403 </para> 417 404
Note:
See TracChangeset
for help on using the changeset viewer.