diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | ChangeLog.vserver | 23 | ||||
-rwxr-xr-x | net-scripts/init.d/net.lo | 2 | ||||
-rw-r--r-- | net-scripts/net.modules.d/iwconfig | 29 | ||||
-rwxr-xr-x | sbin/rc-daemon.sh | 2 | ||||
-rwxr-xr-x | sbin/rc-services.sh | 2 | ||||
-rwxr-xr-x | sbin/runscript.sh | 10 |
7 files changed, 71 insertions, 12 deletions
@@ -5,6 +5,21 @@ Give a better error message when no valid DHCP client is installed. + 14 Mar 2006; Roy Marples <uberlord@gentoo.org>: + + Allow services that depend on net to be stopped/started in post + up/down functions when the net service is started by rc. + + 13 Mar 2006; Roy Marples <uberlord@gentoo.org>: + + Allow more than 1 inactive dependant service to start us when it is + started, #125819 thanks to Arnuad Fabre. + + 12 Mar 2006; Roy Marples <uberlord@gentoo.org>: + + iwconfig now strips duplicate mac addresses from scan results which means + we only try and connect to ad-hoc networks once. + 10 Mar 2006; Roy Marples <uberlord@gentoo.org>: iwconfig now reports mode in scan results diff --git a/ChangeLog.vserver b/ChangeLog.vserver index 5b0a27c..3e65375 100644 --- a/ChangeLog.vserver +++ b/ChangeLog.vserver @@ -1,8 +1,21 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPLv2 + 17 Mar 2006; Christian Heim <phreak@gentoo.org>: + Merging latest changes to the baselayout/trunk changes. This merge is based + upon revision 1948. + + ChangeLog | 15 +++++++++ + ChangeLog.vserver | 23 +++++++++++--- + net-scripts/init.d/net.lo | 2 + + net-scripts/net.modules.d/iwconfig | 29 ++++++++++++++++-- + sbin/rc-daemon.sh | 2 - + sbin/rc-services.sh | 2 - + sbin/runscript.sh | 10 ++++-- + 7 files changed, 71 insertions(+), 12 deletions(-) + 11 Mar 2006; Christian Heim <phreak@gentoo.org>: - Merging latest changes to the rc-scripts branch. This merge is based + Merging latest changes to the baselayout/trunk changes. This merge is based upon revision 1943. ChangeLog | 11 ++- @@ -46,7 +59,7 @@ 38 files changed, 312 insertions(+), 193 deletions(-) 09 Mar 2006; Christian Heim <phreak@gentoo.org>: - Merging latest changes to the rc-scripts branch. This merge is based + Merging latest changes to the baselayout/trunk changes. This merge is based upon revision 1939. ChangeLog | 29 ++ @@ -66,7 +79,7 @@ 14 files changed, 298 insertions(+), 218 deletions(-) 27 Feb 2006; Christian Heim <phreak@gentoo.org>: - Merging latest changes to the rc-scripts branch. This merge is based + Merging latest changes to the baselayout/trunk changes. This merge is based upon revision 1928. ChangeLog | 16 ++ @@ -107,7 +120,7 @@ 35 files changed, 388 insertions(+), 387 deletions(-) 23 Feb 2006; Christian Heim <phreak@gentoo.org>: - Merging latest changes to the rc-scripts branch. This merge is based + Merging latest changes to the baselayout/trunk changes. This merge is based upon revision 1924. ChangeLog | 21 + @@ -122,7 +135,7 @@ 9 files changed, 179 insertions(+), 68 deletions(-) 17 Feb 2006; Christian Heim <phreak@gentoo.org>: - Merging latest changes to the rc-scripts branch. This merge is based + Merging latest changes to the baselayout/trunk changes. This merge is based upon revision 1909. ChangeLog | 17 ++++- diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo index 0ee6262..f73dfac 100755 --- a/net-scripts/init.d/net.lo +++ b/net-scripts/init.d/net.lo @@ -796,6 +796,7 @@ run_start() { # We need to mark the service as started incase a # postdown function wants to restart services that depend on us mark_service_started "net.${iface}" + end_service "net.${iface}" 0 einfo "Running postup function" eindent ( postup "${iface}" ) @@ -840,6 +841,7 @@ run_stop() { # We need to mark the service as stopped incase a # postdown function wants to restart services that depend on us [[ ${IN_BACKGROUND} != "true" ]] && mark_service_stopped "net.${iface}" + end_service "net.${iface}" 0 einfo "Running postdown function" eindent ( postdown "${iface}" ) diff --git a/net-scripts/net.modules.d/iwconfig b/net-scripts/net.modules.d/iwconfig index 73fa5b0..0711043 100644 --- a/net-scripts/net.modules.d/iwconfig +++ b/net-scripts/net.modules.d/iwconfig @@ -170,7 +170,7 @@ iwconfig_user_config() { if [[ -n ${!conf} ]]; then aconf=( "${!conf}" ) for conf in "${aconf[@]}" ; do - if ! eval iwconfig "${iface}" "${conf}" ; then + if ! iwconfig "${iface}" ${conf} ; then ewarn "${iface} does not support the following configuration commands" ewarn " ${conf}" fi @@ -181,7 +181,7 @@ iwconfig_user_config() { if [[ -n ${!conf} ]]; then aconf=( "${!conf}" ) for conf in "${aconf[@]}" ; do - if ! eval iwpriv "${iface}" "${conf}" ; then + if ! iwpriv "${iface}" ${conf} ; then ewarn "${iface} does not support the following private ioctls" ewarn " ${conf}" fi @@ -512,6 +512,31 @@ iwconfig_scan() { x="$( echo "${!x:-managed}" | tr '[:upper:]' '[:lower:]' )" [[ ${mode} != "${x}" ]] && iwconfig "${iface}" mode "${x}" + # Strip any duplicates + local i j x="${#mac[@]}" y + for (( i=0; i<x-1; i++ )) ; do + [[ -z ${mac[i]} ]] && continue + for (( j=i+1; j<x; j++)) ; do + if [[ ${mac[i]} == "${mac[j]}" ]] ; then + if [[ ${qual[i]} -gt ${qual[j]} ]] ; then + y="${j}" + else + y="${j}" + fi + unset mac[y] + unset qual[y] + unset essid[y] + unset mode[y] + unset enc[y] + fi + done + done + mac=( "${mac[@]}" ) + qual=( "${qual[@]}" ) + essid=( "${essid[@]}" ) + mode=( "${mode[@]}" ) + enc=( "${enc[@]}" ) + for (( i=0; i<${#mac[@]}; i++ )); do # Don't like ad-hoc nodes by default [[ ${mode[i]} == "ad-hoc" ]] && (( qual[i]-=10000 )) diff --git a/sbin/rc-daemon.sh b/sbin/rc-daemon.sh index 9f9cd26..81ca457 100755 --- a/sbin/rc-daemon.sh +++ b/sbin/rc-daemon.sh @@ -16,7 +16,7 @@ RC_GOT_DAEMON="yes" [[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh -[[ ${RC_GOT_SVCNAMES} != "yes" ]] && source "${svclib}/sh/rc-services.sh" +[[ ${RC_GOT_SERVICES} != "yes" ]] && source "${svclib}/sh/rc-services.sh" RC_RETRY_KILL="no" RC_RETRY_TIMEOUT=1 diff --git a/sbin/rc-services.sh b/sbin/rc-services.sh index 2991176..199a8d2 100755 --- a/sbin/rc-services.sh +++ b/sbin/rc-services.sh @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # RC Dependency and misc service functions -RC_GOT_SVCNAMES="yes" +RC_GOT_SERVICES="yes" [[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh diff --git a/sbin/runscript.sh b/sbin/runscript.sh index 72347bc..2c184c8 100755 --- a/sbin/runscript.sh +++ b/sbin/runscript.sh @@ -42,7 +42,7 @@ svcpause="no" svcrestart="no" # Functions to handle dependencies and services -[[ ${RC_GOT_SVCNAMES} != "yes" ]] && source "${svclib}/sh/rc-services.sh" +[[ ${RC_GOT_SERVICES} != "yes" ]] && source "${svclib}/sh/rc-services.sh" # Functions to control daemons [[ ${RC_GOT_DAEMON} != "yes" ]] && source "${svclib}/sh/rc-daemon.sh" @@ -359,11 +359,12 @@ svc_start() { if service_inactive "${x}" || service_wasinactive "${x}" || \ [[ -n $(ls "${svcdir}"/scheduled/*/"${x}" 2>/dev/null) ]] ; then svc_schedule_start "${x}" "${SVCNAME}" - startinactive="${x}" + [[ -n ${startinactive} ]] && startinactive="${startinactive}, " + startinactive="${startinactive}${x}" else startfail="${x}" + break fi - break fi fi done @@ -373,6 +374,9 @@ svc_start() { eerror " ${SVCNAME} was not started." retval=1 elif [[ -n ${startinactive} ]] ; then + # Change the last , to or for correct grammar. + x="${startinactive##*, }" + startinactive="${startinactive/%, ${x}/ or ${x}}" ewarn "WARNING: ${SVCNAME} is scheduled to start when ${startinactive} has started." retval=1 elif broken "${SVCNAME}" ; then |