Changeset 5bc57bb for networking/netprogs/wpa_supplicant.xml
- Timestamp:
- 07/15/2014 11:44:38 AM (10 years ago)
- Branches:
- gnome
- Children:
- d555a31
- Parents:
- cae7a6f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
networking/netprogs/wpa_supplicant.xml
rcae7a6f r5bc57bb 312 312 313 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> 314 This package provides systemd units in the source tarball. 315 To install them, issue the following commands as the 316 <systemitem class="username">root</systemitem> user: 317 </para> 318 319 <screen role="root"> 320 <userinput> 321 install -v -m644 systemd/*.service /lib/systemd/system 322 </userinput></screen> 323 324 <para> 325 The following files were installed: 326 327 /lib/systemd/system/wpa_supplicant.service 328 329 /lib/systemd/system/wpa_supplicant-nl80211@.service 330 /lib/systemd/system/wpa_supplicant-wired@.service 331 /lib/systemd/system/wpa_supplicant@.service 332 333 The first service should be enabled if D-Bus interface was built into 334 wpa_supplicant, so that wpa_supplicant D-Bus interface can be started at boot 335 instead of being automatically activated by the D-Bus daemon which doesn't work 336 when using systemd. 337 To enable the service issue the following command as the 338 <systemitem class="username">root</systemitem> user: 339 </para> 340 341 <screen role="root"> 342 <userinput> 343 systemctl enable wpa_supplicant.service 344 </userinput></screen> 345 346 <para> 347 The following three files are per-interface specific files. 348 Much like LFS ifupdown@.service, they will start wpa_supplicant for a network 349 interface. Only difference between the three files is the wpa_supplicant_driver 350 being used. 351 352 The first one uses -Dnl80211, the second one uses -Dwired and the last one uses 353 default -D option (not specified). 354 </para> 355 321 356 322 357 <indexterm zone="wpa_supplicant wpa-service"> … … 327 362 If your router/access point uses DHCP to allocate IP addresses, you 328 363 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> 364 automatically obtain network addresses. If your using the first unit file 365 Create the 366 <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf 331 367 </filename> by running the following command as the 332 368 <systemitem class="username">root</systemitem> user: 333 369 </para> 334 370 335 <screen role="root"><userinput>cat > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "EOF" 371 <note> 372 <para> 373 wifi0 needs to be replaced with the actual interface. 374 </para> 375 </note> 376 377 <screen role="root"><userinput>cat > /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf << "EOF" 336 378 <literal>ONBOOT="yes" 337 379 IFACE="<replaceable>wlan0</replaceable>" … … 354 396 EOF</userinput></screen> 355 397 398 <note> 399 <para> 400 Note that the argument after @ and the interface name, 401 ie wifi0 must be the same. 402 </para> 403 </note> 404 405 <para> 406 To enable it, issue the following command as the 407 <systemitem class="username">root</systemitem> user: 408 </para> 409 <screen role="root"><userinput> 410 systemctl enable wpa_supplicant-nl80211@wifi0 411 </userinput></screen> 412 413 <para> 414 If your using the second unit file 415 Create the 416 <filename>/etc/wpa_supplicant/wpa_supplicant-wired-<replaceable>eth0</replaceable>.conf 417 </filename> by running the following command as the 418 <systemitem class="username">root</systemitem> user: 419 </para> 420 421 <screen role="root"><userinput>cat > /etc/wpa_supplicant/wpa_supplicant-wired-<replaceable>eth0</replaceable>.conf << "EOF" 422 <literal>ONBOOT="yes" 423 IFACE="<replaceable>eth0</replaceable>" 424 SERVICE="wpa" 425 426 # Additional arguments to wpa_supplicant 427 WPA_ARGS="" 428 429 WPA_SERVICE="dhclient" 430 DHCP_START="" 431 DHCP_STOP="" 432 433 # Set PRINTIP="yes" to have the script print 434 # the DHCP assigned IP address 435 PRINTIP="no" 436 437 # Set PRINTALL="yes" to print the DHCP assigned values for 438 # IP, SM, DG, and 1st NS. This requires PRINTIP="yes". 439 PRINTALL="no"</literal> 440 EOF</userinput></screen> 441 442 <note> 443 <para> 444 Note that the argument after @ and the interface name, 445 ie eth0 must be the same. 446 </para> 447 </note> 448 449 <para> 450 To enable it, issue the following command as the 451 <systemitem class="username">root</systemitem> user: 452 </para> 453 454 <screen role="root"><userinput> 455 systemctl enable wpa_supplicant-wired@eth0 456 </userinput></screen> 457 458 <para> 459 If your using the third unit file 460 Create the 461 <filename>/etc/wpa_supplicant/wpa_supplicant-<replaceable>eth0</replaceable>.conf 462 </filename> by running the following command as the 463 <systemitem class="username">root</systemitem> user: 464 </para> 465 466 <screen role="root"><userinput>cat > /etc/wpa_supplicant/wpa_supplicant-<replaceable>eth0</replaceable>.conf << "EOF" 467 <literal>ONBOOT="yes" 468 IFACE="<replaceable>eth0</replaceable>" 469 SERVICE="wpa" 470 471 # Additional arguments to wpa_supplicant 472 WPA_ARGS="" 473 474 WPA_SERVICE="dhclient" 475 DHCP_START="" 476 DHCP_STOP="" 477 478 # Set PRINTIP="yes" to have the script print 479 # the DHCP assigned IP address 480 PRINTIP="no" 481 482 # Set PRINTALL="yes" to print the DHCP assigned values for 483 # IP, SM, DG, and 1st NS. This requires PRINTIP="yes". 484 PRINTALL="no"</literal> 485 EOF</userinput></screen> 486 487 <note> 488 <para> 489 Note that the argument after @ and the interface name, 490 ie eth0 must be the same. 491 </para> 492 </note> 493 494 <para> 495 To enable it, issue the following command as the 496 <systemitem class="username">root</systemitem> user: 497 </para> 498 499 <screen role="root"><userinput> 500 systemctl enable wpa_supplicant-@eth0 501 </userinput></screen> 502 356 503 <para> 357 504 If you prefer <xref linkend="dhcpcd"/> instead of 358 505 <xref linkend="dhcp"/> client, then create the 359 <filename>/etc/ sysconfig/ifconfig-<replaceable>wifi0</replaceable>506 <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf 360 507 </filename> by running the following command as the 361 508 <systemitem class="username">root</systemitem> user: 362 509 </para> 363 510 364 <screen role="root"><userinput>cat > /etc/ sysconfig/ifconfig.<replaceable>wifi0</replaceable><< "EOF"511 <screen role="root"><userinput>cat > /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf << "EOF" 365 512 <literal>ONBOOT="yes" 366 IFACE="<replaceable>w lan0</replaceable>"513 IFACE="<replaceable>wifi0</replaceable>" 367 514 SERVICE="wpa" 368 515 … … 378 525 Alternatively, if you use static addresses on your local network, 379 526 then create the 380 <filename>/etc/ sysconfig/ifconfig-<replaceable>wifi0</replaceable>527 <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf 381 528 </filename> by running the following command as the 382 529 <systemitem class="username">root</systemitem> user: 383 530 </para> 384 531 385 <screen role="root"><userinput>cat > /etc/ sysconfig/ifconfig.<replaceable>wifi0</replaceable><< "EOF"532 <screen role="root"><userinput>cat > /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf << "EOF" 386 533 <literal>ONBOOT="yes" 387 IFACE="<replaceable>w lan0</replaceable>"534 IFACE="<replaceable>wifi0</replaceable>" 388 535 SERVICE="wpa" 389 536
Note:
See TracChangeset
for help on using the changeset viewer.