Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 337066 Details for
Bug 454368
[fa] handbook/hb-net-functions.xml
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
hb-net-functions.xml
hb-net-functions.xml (text/plain), 6.65 KB, created by
Hadi Sarami
on 2013-01-28 03:07:00 UTC
(
hide
)
Description:
hb-net-functions.xml
Filename:
MIME Type:
Creator:
Hadi Sarami
Created:
2013-01-28 03:07:00 UTC
Size:
6.65 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE sections SYSTEM "/dtd/book.dtd"> > ><!-- The content of this document is licensed under the CC-BY-SA license --> ><!-- See http://creativecommons.org/licenses/by-sa/2.5 --> > ><!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-functions.xml,v 1.13 2011/10/30 11:56:08 swift Exp $ --> > ><sections> > ><abstract> >اگر اÙ٠٠اجراâجÙÛÛ ÙستÛØ¯Ø Ù ÛâتÙاÙÛد تابعâÙØ§Û Ø®Ùدتا٠را ب٠شبکÙâØ³Ø§Ø²Û Ø¨ÛاÙزاÛÛد. ></abstract> > ><version>9</version> ><date>2011-10-30</date> > ><section> ><title>ÚÙÚ¯Ú©âÙØ§Û ØªØ§Ø¨Ø¹ استاÙدارد</title> ><body> > ><p> >ÚÙار تابع Ù ÛâتÙاÙÙد در <path>/etc/conf.d/net</path> تعرÛ٠گردÙد ک٠آÙÙا را ÙداÛتگرÙØ§Û Ø§Øاط٠کÙÙد٠<c>start</c>/<c>stop</c> ÙراخÙاÙÛ Ù ÛâÙ٠اÛÙد. تابعâÙا ابتدا با Ùا٠رابط کاربرÛâشا٠ÙراخÙاÙد٠٠ÛâØ´ÙÙد بÙابر اÛÙ ÛÚ© تابع Ù ÛâتÙاÙد ÚÙدÛ٠آداپتر را Ú©Ùتر٠Ù٠اÛد. ></p> > ><p> >Ù Ùدار Ø¨Ø±Ú¯Ø´ØªÛ Ø¨Ø±Ø§Û ØªØ§Ø¨Ø¹âÙØ§Û <c>preup()</c> Ù <c>predown()</c> باÛد Û° (ب٠٠عÙÛ Ù ÙÙÙ) باشد تا ÙشاÙâدÙد Ù¾ÛکربÙØ¯Û Ûا خرÙج از Ù¾ÛکربÙØ¯Û Ù ÛâتÙاÙد ادا٠٠بÛابد. اگر <c>preup()</c> Ù Ùدار غÛر صÙØ±Û Ø±Ø§ بازگرداÙØ¯Ø Ø¢Ùگا٠رابط کاربر Ù¾ÛکربÙØ¯Û Ø¨ÛâÙتÛج٠٠Ûâ٠اÙد. اگر <c>predown()</c> Ù Ùدار غÛر صÙØ±Û Ø±Ø§ بازگرداÙØ¯Ø Ø¢Ùگا٠رابط Ú©Ø§Ø±Ø¨Ø±Û Ø§Ø¬Ø§Ø²Ù Ø§Ø¯Ø§Ù Ù Ø®Ø§Ø±Ø¬ Ø³Ø§Ø²Û Ø§Ø² Ù¾ÛکربÙØ¯Û Ø±Ø§ ÙØ®ÙاÙد داشت. ></p> > ><p> >اگر Ù ÙدارÙØ§Û Ø¨Ø§Ø²Ú¯Ø´ØªÛ Ø¨Ø±Ø§Û ØªØ§Ø¨Ø¹âÙØ§Û <c>postup()</c> Ù <c>postdown()</c> شکست بخÙرÙØ¯Ø Ø§Ø² Ø¢Ùجا Ú©Ù ÚÛØ²Û Ø¨Ø±Ø§Û Ø§Ùجا٠داد٠ÙجÙد ÙØ¯Ø§Ø±Ø¯Ø ÙادÛد٠اÙÚ¯Ø§Ø´ØªÙ Ù Û Ø´ÙÙد. ></p> > ><p> >گزÛÙÙ <c>${IFACE}</c> رابط Ú©Ø§Ø±Ø¨Ø±Û Ø±Ø§ بگÙÙÙâاÛÛ ØªÙظÛÙ Ù ÛâÙ٠اÛد ک٠بشک٠باÙا/پاÛÛ٠کار Ú©Ùد. گزÛÙÙ <c>${IFVAR}</c> Ù٠ا٠گزÛÙÙ <c>${IFACE}</c> است ک٠ب٠Ùا٠٠تغÛÛر ٠جاز Ø¨Ø±Ø§Û bash تبدÛ٠گردÛدÙ. ></p> > ><pre caption="pre/post up/down function examples in /etc/conf.d/net"> >preup() { > <comment># Test for link on the interface prior to bringing it up. This > # only works on some network adapters and requires the ethtool > # package to be installed.</comment> > if ethtool ${IFACE} | grep -q 'Link detected: no'; then > ewarn "No link on ${IFACE}, aborting configuration" > return 1 > fi > > <comment># Remember to return 0 on success</comment> > return 0 >} > >predown() { > <comment># The default in the script is to test for NFS root and disallow > # downing interfaces in that case. Note that if you specify a > # predown() function you will override that logic. Here it is, in > # case you still want it...</comment> > if is_net_fs /; then > eerror "root filesystem is network mounted -- can't stop ${IFACE}" > return 1 > fi > > <comment># Remember to return 0 on success</comment> > return 0 >} > >postup() { > <comment># This function could be used, for example, to register with a > # dynamic DNS service. Another possibility would be to > # send/receive mail once the interface is brought up.</comment> > return 0 >} > >postdown() { > <comment># This function is mostly here for completeness... I haven't > # thought of anything nifty to do with it yet ;-)</comment> > return 0 >} ></pre> > ><note> >Ø¨Ø±Ø§Û Ø§Ø·Ùاعات بÛشتر Ø¨Ø±Ø§Û ÙÙشت٠تابعâÙØ§Û Ø®ÙدتاÙØ Ø®ÙاÙØ´Ù ÙدÛÙ <path>/usr/share/doc/openrc-*/net.example.bz2</path> را بخÙاÙÛد. ></note> > ></body> ></section> ><section> ><title>ÚÙÚ¯Ú©âÙØ§Û ØªØ§Ø¨Ø¹ ابزارÙØ§Û Ø¨ÛسÛÙ </title> ><body> > ><note> >اÛ٠با درخÙاستâÙØ§Û WPA کار ÙØ®ÙاÙد ÙÙ Ùد - ا٠ا ٠تغÛÛرÙØ§Û <c>${ESSID}</c> Ù <c>${ESSIDVAR}</c> در تابع <c>postup()</c> ÙجÙد دارÙد. ></note> > ><p> >د٠تابع Ù Û ØªÙاÙÙد در <path>/etc/conf.d/net</path> تعرÛ٠گردÙد ک٠تابعâÙØ§Û ÙÙ âÙ¾ÛÙÙد Ù ØÛØ·Û Ø±Ø§ ÙراخÙاÙÛ Ù ÛâÙ٠اÛÙد. تابعâÙا ابتدا با Ùا٠رابط Ú©Ø§Ø±Ø¨Ø±Û ÙراخÙاÙÛ Ù ÛâگردÙد بÙابر اÛÙ ÛÚ© تابع Ù ÛâتÙاÙد ÚÙدÛ٠آداپتر را Ú©Ùتر٠Ù٠اÛد. ></p> > ><p> >Ù Ùدار Ø¨Ø±Ú¯Ø´ØªÛ Ø¨Ø±Ø§Û ØªØ§Ø¨Ø¹â <c>preassociate()</c> باÛد Û° (ب٠٠عÙÛ Ù ÙÙÙ) باشد تا ÙشاÙâدÙد Ù¾ÛکربÙØ¯Û Ûا خرÙج از Ù¾ÛکربÙØ¯Û Ù ÛâتÙاÙد ادا٠٠بÛابد. اگر <c>preassociate()</c> Ù Ùدار غÛر صÙØ±Û Ø±Ø§ بازگرداÙØ¯Ø Ø¢Ùگا٠رابط کاربر Ù¾ÛکربÙØ¯Û Ø¨ÛâÙتÛج٠٠Ûâ٠اÙد. ></p> > ><p> >اگر Ù ÙدارÙØ§Û Ø¨Ø§Ø²Ú¯Ø´ØªÛ Ø¨Ø±Ø§Û ØªØ§Ø¨Ø¹â <c>postassociate()</c> شکست بخÙØ±Ø¯Ø Ø§Ø² Ø¢Ùجا Ú©Ù ÚÛØ²Û Ø¨Ø±Ø§Û Ø§Ùجا٠داد٠ÙجÙد ÙØ¯Ø§Ø±Ø¯Ø ÙادÛد٠اÙÚ¯Ø§Ø´ØªÙ Ù Û Ø´Ùد. ></p> > ><p> >گزÛÙÙ <c>${ESSID}</c> ب٠ESSID دÙÛÙÛ Ú©Ù AP ش٠ا ب٠آ٠ارتباط Ù¾Ûدا کرد٠تÙظÛÙ Ù Ûâگردد. گزÛÙÙ <c>${ESSIDVAR}</c> Ù٠ا٠گزÛÙÙ <c>${ESSID}</c> است ک٠ب٠Ùا٠٠تغÛÛر ٠جاز Ø¨Ø±Ø§Û bash تبدÛ٠گردÛدÙ. ></p> > ><pre caption="pre/post association functions in /etc/conf.d/net"> >preassociate() { > <comment># The below adds two configuration variables leap_user_ESSID > # and leap_pass_ESSID. When they are both configured for the ESSID > # being connected to then we run the CISCO LEAP script</comment> > > local user pass > eval user=\"\$\{leap_user_${ESSIDVAR}\}\" > eval pass=\"\$\{leap_pass_${ESSIDVAR}\}\" > > if [[ -n ${user} && -n ${pass} ]]; then > if [[ ! -x /opt/cisco/bin/leapscript ]]; then > eend "For LEAP support, please emerge net-misc/cisco-aironet-client-utils" > return 1 > fi > einfo "Waiting for LEAP Authentication on \"${ESSID//\\\\//}\"" > if /opt/cisco/bin/leapscript ${user} ${pass} | grep -q 'Login incorrect'; then > ewarn "Login Failed for ${user}" > return 1 > fi > fi > > return 0 >} > >postassociate() { > <comment># This function is mostly here for completeness... I haven't > # thought of anything nifty to do with it yet ;-)</comment> > > return 0 >} ></pre> > ><note> >گزÛÙÙâÙØ§Û <c>${ESSID}</c> Ù <c>${ESSIDVAR}</c> در تابعâÙØ§Û <c>predown()</c> Ù <c>postdown()</c> ÙجÙد ÙدارÙد. ></note> > ><note> >Ø¨Ø±Ø§Û Ø¯Ø§Ø¯ÙâÙØ§Û Ø¨Ûشتر Ø¨Ø±Ø§Û ÙÙشت٠تابعâÙØ§Û Ø®ÙØ¯Ø Ø®ÙاÙØ´Ù ÙدÛÙ <path>/usr/share/doc/openrc-*/net.example.bz2</path> را بخÙاÙÛد. ></note> > ></body> ></section> > ></sections>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 454368
: 337066