From c5f50782079ef12a6e1649638c92f25eccab35ce Mon Sep 17 00:00:00 2001 From: Christian Heim Date: Fri, 17 Mar 2006 09:51:26 +0000 Subject: Merging r1948 svn path=/baselayout-vserver/trunk/; revision=290 --- 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(-) diff --git a/ChangeLog b/ChangeLog index a0f8a3a..7c6a153 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,21 @@ Give a better error message when no valid DHCP client is installed. + 14 Mar 2006; Roy Marples : + + 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 : + + Allow more than 1 inactive dependant service to start us when it is + started, #125819 thanks to Arnuad Fabre. + + 12 Mar 2006; Roy Marples : + + 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 : 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 : + 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 : - 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 : - 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 : - 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 : - 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 : - 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/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 -- cgit v1.2.3-65-gdbad