Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 73811 Details for
Bug 113880
Wake on LAN support within net.ethX scripts
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Wake On LAN patch
wol.patch (text/plain), 2.87 KB, created by
Roy Marples (RETIRED)
on 2005-11-29 14:34:15 UTC
(
hide
)
Description:
Wake On LAN patch
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2005-11-29 14:34:15 UTC
Size:
2.87 KB
patch
obsolete
>Index: init.d/shutdown.sh >=================================================================== >--- init.d/shutdown.sh (revision 1645) >+++ init.d/shutdown.sh (working copy) >@@ -1,8 +1,11 @@ > # Copyright 1999-2005 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 > >-/sbin/halt -ihdp >+opts="-hdp" >+[[ ${RC_DOWN_INTERFACE:-yes} == "yes" ]] && opts="${opts}i" > >+/sbin/halt "${opts}" >+ > # hmm, if the above failed, that's kind of odd ... > # so let's force a halt > /sbin/halt -f >Index: etc/conf.d/rc >=================================================================== >--- etc/conf.d/rc (revision 1645) >+++ etc/conf.d/rc (working copy) >@@ -35,6 +35,12 @@ > > RC_AUTO_INTERFACE="no" > >+# RC_DOWN_INTERFACE allows you to specify if RC will bring the interface >+# compeletly down when it stops. The default is yes, but there are some >+# instances where you may not want this to happen. >+ >+RC_DOWN_INTERFACE="yes" >+ > # RC_VOLUME_ORDER allows you to specify, or even remove the volume setup > # for various volume managers (MD, EVMS2, LVM, DM, etc). Note that they are > # stopped in reverse order. >Index: init.d/net.lo >=================================================================== >--- init.d/net.lo (revision 1645) >+++ init.d/net.lo (working copy) >@@ -707,7 +707,8 @@ > interface_del_addresses "${i}" > > # Do final shut down of this alias >- if ! ${IN_BACKGROUND}; then >+ if [[ ${IN_BACKGROUND} != "true" \ >+ && ${RC_DOWN_INTERFACE} == "yes" ]]; then > ebegin "Shutting down ${i}" > interface_iface_stop "${i}" > eend "$?" >Index: etc/conf.d/net.example >=================================================================== >--- etc/conf.d/net.example (revision 1645) >+++ etc/conf.d/net.example (working copy) >@@ -619,7 +619,7 @@ > # # Test for link on the interface prior to bringing it up. This > # # only works on some network adapters and requires the mii-diag > # # package to be installed. >-# if mii-tool ${IFACE} 2> /dev/null | grep -q 'no link'; then >+# if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then > # ewarn "No link on ${IFACE}, aborting configuration" > # return 1 > # fi >@@ -627,11 +627,12 @@ > # # 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. >-# if ethtool ${IFACE} | grep -q 'Link detected: no'; then >+# if ethtool "${IFACE}" | grep -q 'Link detected: no'; then > # ewarn "No link on ${IFACE}, aborting configuration" > # return 1 > # fi > # >+# > # # Remember to return 0 on success > # return 0 > #} >@@ -658,8 +659,11 @@ > #} > > #postdown() { >-# # This function is mostly here for completeness... I haven't >-# # thought of anything nifty to do with it yet ;-) >+# # Enable Wake-On-LAN for the interface >+# # Probably a good idea to set RC_DOWN_INTERFACE="no" in /etc/conf.d/rc >+# # as well ;) >+# ethtool -s "${IFACE}" wol g >+# > # # Return 0 always > # return 0 > #}
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 113880
: 73811