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 #}