commit sysconfig for openSUSE:Factory
Hello community, here is the log from the commit of package sysconfig for openSUSE:Factory checked in at Mon May 4 18:35:00 CEST 2009. -------- --- sysconfig/sysconfig.changes 2009-03-24 14:42:11.000000000 +0100 +++ /mounts/work_src_done/STABLE/sysconfig/sysconfig.changes 2009-04-30 14:54:51.525904454 +0200 @@ -1,0 +2,5 @@ +Thu Apr 30 14:52:53 CEST 2009 - werner@suse.de + +- Use usleep for more often + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- sysconfig-0.71.15.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysconfig.spec ++++++ --- /var/tmp/diff_new_pack.l25213/_old 2009-05-04 18:34:01.000000000 +0200 +++ /var/tmp/diff_new_pack.l25213/_new 2009-05-04 18:34:01.000000000 +0200 @@ -20,7 +20,7 @@ Name: sysconfig Version: 0.71.15 -Release: 1 +Release: 2 Summary: The sysconfig scheme Group: System/Base License: GPL v2 or later @@ -30,6 +30,7 @@ BuildRequires: sysfsutils BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: %name-%version.tar.bz2 +Patch: %name-%version.patch %description This package provides the SuSE system configuration scheme. @@ -50,6 +51,7 @@ %prep %setup -n sysconfig-%{version} +%patch %build autoreconf --force --install @@ -257,6 +259,8 @@ %{stop_on_removal network} %changelog +* Thu Apr 30 2009 werner@suse.de +- Use usleep for more often * Tue Mar 24 2009 mt@suse.de - version 0.71.15 - Added /etc/modprobe.d/50-ipv6.conf config (noreplace install) @@ -829,7 +833,7 @@ - blacklist 82875p_edac. (Bug 213840) - added hal and dbus to 'Requires:' in specfile since rcnetwork requires these services. (Bug 214652) -* Sat Oct 21 2006 thoenig@suse.de +* Sun Oct 22 2006 thoenig@suse.de - Let the checkproc replacement be LSB compliant (b.n.c #213249). * Mon Oct 09 2006 kay.sievers@suse.de - new version 0.60.0 @@ -986,7 +990,7 @@ + fixed another segfault fault which became visible by bugfix 152499 - STARTMODE=ifplugd: ifup/down will now always start/stop ifplugd if not called with -o ifplug (which is used by ifplugd-selectif). (Bug 152824) -* Mon Feb 20 2006 schwab@suse.de +* Tue Feb 21 2006 schwab@suse.de - Fix modification of sysconfig.config-hardware in .spec. * Mon Feb 20 2006 zoz@suse.de - new version 0.50.5 @@ -2638,7 +2642,7 @@ - Fix the %%post way of calling oldnet2new.sh - Convert MODIFY_RESOLV_CONF_DYNAMICALLY and CLOSE_CONNECTION correctly (Bug #14600) -* Wed Mar 06 2002 arvin@suse.de +* Thu Mar 07 2002 arvin@suse.de - fixed converting of modem and dsl config during update * Wed Mar 06 2002 mmj@suse.de - Renamed variables for if*-connection and added an option to have ++++++ sysconfig-0.71.15.patch ++++++ --- scripts/extradebug +++ scripts/extradebug 2009-04-30 12:31:32.301902274 +0200 @@ -13,9 +13,9 @@ exec 2> $dir/exdeb.${SCRIPT}_$$.$PPID.${ date +"%F %T.%N" >&2 echo -------------------------------------------------- >&2 -ps axwfu | head -1 >&2 -#ps axwfu | grep -v "grep\|sed" | grep -C3 "$$\|ifplugd\|dhcp\|ifup\|ifdown\|ifstatus" | -ps axwwfu | grep -C3 "$$\|ifplugd\|dhcp\|ifup\|ifdown\|ifstatus" | +ps axhwfu >&2 +#ps axhwfu | grep -v "grep\|sed" | grep -C3 "$$\|ifplugd\|dhcp\|ifup\|ifdown\|ifstatus" | +ps axhwwfu | grep -C3 "$$\|ifplugd\|dhcp\|ifup\|ifdown\|ifstatus" | \ sed "s/ $$ /#$$#/" >&2 echo -------------------------------------------------- >&2 ls -ltr --full-time /sys/class/net /dev/shm/sysconfig >&2 --- scripts/functions +++ scripts/functions 2009-04-30 12:25:29.145901946 +0200 @@ -712,7 +712,7 @@ netcontrol_running() { # returns 0 if ifup is currently working on this interface ifup_on_iface() { - ps axww | grep -qs "[i]fup.* $INTERFACE\>" + ps axhww | grep -qs "[i]fup.* $INTERFACE\>" } # returns 0 if there is a dhcp client running on this interface @@ -728,7 +728,7 @@ dhcpc4_on_iface() { retval=0 test "x$1" == "x-q" && break echo $pid - done < <(ps axww | grep -Es "[ /]$DHCLIENT\>.*\<$INTERFACE\>$") + done < <(ps axhww | grep -Es "[ /]$DHCLIENT\>.*\<$INTERFACE\>$") fi return $retval } @@ -740,7 +740,7 @@ dhcpc6_on_iface() { retval=0 test "x$1" == "x-q" && break echo $pid - done < <(ps axww | grep -Es "[ /]$DHCLIENT6\>.*\<$INTERFACE\>$") + done < <(ps axhww | grep -Es "[ /]$DHCLIENT6\>.*\<$INTERFACE\>$") fi return $retval } @@ -753,7 +753,7 @@ dhcpc_on_iface() { retval=0 test "$1" == "-q" && break echo $pid - done < <(ps axww | grep -Es "[ /]($DHCLIENT|$DHCLIENT6)\>.*\<$INTERFACE\>$") + done < <(ps axhww | grep -Es "[ /]($DHCLIENT|$DHCLIENT6)\>.*\<$INTERFACE\>$") fi return $retval } @@ -787,7 +787,7 @@ any_dhcpc_on_iface() retval=0 test "$1" == "-q" && break echo $pid - done < <(ps axww | grep -Es "[ /]($dhclients)\>.*\<$INTERFACE\>$") + done < <(ps axhww | grep -Es "[ /]($dhclients)\>.*\<$INTERFACE\>$") fi fi return $retval --- scripts/ifplugd-selectif +++ scripts/ifplugd-selectif 2009-04-30 13:50:57.086313619 +0200 @@ -34,8 +34,14 @@ test -f ./config && . ./config # . scripts/extradebug get_carrier() { - test "`cat /sys/class/net/${1}/carrier 2>/dev/null`" != 1 && sleep 1 - cat /sys/class/net/${1}/carrier 2>/dev/null + local -i carrier=0 count=40 + local check=/sys/class/net/${1}/carrier + while ((count-- > 0)) ; do + test -e $check && read -t 1 carrier < $check + ((carrier == 1)) && break + usleep 25000 + done + echo $carrier } debug $0 $* --- scripts/ifup +++ scripts/ifup 2009-04-30 12:43:48.741901035 +0200 @@ -358,13 +358,13 @@ if [ "$CONTROL_IFPLUGD" == yes ] ; then # Additionally ifdown must not return before ifplugd has terminated # so that a new ifplugd may be started when calling 'rcnetwork # restart' (See bug 129648). - for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do + for ((count=0; count<800; count++)) ; do if [ ! -f /var/run/ifplugd.$INTERFACE.pid ] ; then debug "ifplugd terminated" break fi - debug "waiting for ifplugd to terminate ($i)" - sleep 1 + ((count%40 == 1)) && debug "waiting for ifplugd to terminate ($((count/40+1)))" + usleep 25000 done fi ;; --- scripts/ifup-autoip +++ scripts/ifup-autoip 2009-04-30 12:52:46.029901238 +0200 @@ -104,7 +104,10 @@ case "$ACTION" in if test -n "$PREPARE" ; then test "$status" = BEATEN -o "$status" = CHOOSING -o "$status" = DEFENDING && exit $R_SUCCESS ip link set $INTERFACE up - for a in 1 2 3 4 5; do is_iface_up $INTERFACE && break; sleep 1; done + for ((count=200; count >= 0; count--)) ; do + is_iface_up $INTERFACE && break + usleep 25000 + done # three seconds grace period /sbin/autoip -B -g 3 $INTERFACE || exit $R_ERROR exit $R_SUCCESS @@ -112,7 +115,10 @@ case "$ACTION" in ip link set $INTERFACE up ${MTU:+mtu $MTU} \ ${LLADDR:+address $LLADDR} $LINK_OPTIONS - for a in 1 2 3 4 5; do is_iface_up $INTERFACE && break; sleep 1; done + for ((count=200; count >= 0; count--)) ; do + is_iface_up $INTERFACE && break + usleep 25000 + done if test "$RUN_FROM_RC" = yes; then message_n "(autoip) " @@ -128,7 +134,7 @@ case "$ACTION" in /sbin/autoip -B $INTERFACE || exit $R_ERROR fi - for ((i=0; i<30; i++)); do + for ((count=0; count<1200; count++)); do pid= status= ipaddr= if test -e $info ; then while read l ; do @@ -144,7 +150,8 @@ case "$ACTION" in status=FAILED break } - message_n .\ ; sleep 1 + ((count%40 == 1)) && message_n ". " + usleep 25000 done if test "$status" = BEATEN ; then message_n "already configured" --- scripts/ifup-bonding +++ scripts/ifup-bonding 2009-04-30 13:40:54.128238153 +0200 @@ -137,9 +137,9 @@ load_bond() { /sbin/modprobe bonding # If we add module option max_bonds=0 in the modprobe command above # then we may skip the following lines in this if-fi block. - for a in {1..33}; do + for ((count=400; count >= 0; count--)) ; do test -r "$sysfs_npath/bonding_masters" && break - usleep 300000 + usleep 25000 done NIF=`cat "$sysfs_npath/bonding_masters"` if [ -n "$NIF" -a "$NIF" != "$INTERFACE" ] ; then @@ -150,16 +150,15 @@ load_bond() { if [ ! -d "$sysfs_iface/bonding" ] ; then echo "+$INTERFACE" > "$sysfs_npath/bonding_masters" fi - for a in {1..33}; do + for ((count=400; count >= 0; count--)) ; do test -d "$sysfs_iface/bonding" && break - usleep 300000 + usleep 25000 done if [ ! -d "$sysfs_iface/bonding" ] ; then return 1 fi # Set options - sleep 1 for OPT in $*; do read OPT_NAME OPT_VALUE < <(IFS==; echo $OPT) if [ "$OPT_NAME" == max_bonds ] ; then --- scripts/ifup-bridge +++ scripts/ifup-bridge 2009-04-30 13:32:05.418401488 +0200 @@ -176,30 +176,32 @@ up) [ -n "$BRIDGE_MAXAGE" ] && brctl setmaxage "$INTERFACE" "$BRIDGE_MAXAGE" ip link set up dev $INTERFACE - N=-300 - NMAX=`cat $SYSFS/$INTERFACE/bridge/forward_delay` - DOTS=0 - EMPTY=0 - STATE=0 + typeset -i N=-300 + typeset -i NMAX + typeset -i EMPTY=0 + typeset -i STATE=0 + typeset -i S + mesg_n "`printf " %-9s forwarddelay (see man ifcfg-bridge) " $INTERFACE`" - while test "$((N+=100))" -lt "$NMAX" ; do - STATE=0 - for bp in $(ls -1 $SYSFS/$INTERFACE/brif/ 2>/dev/null) ; do - EMPTY=1 - sf="$SYSFS/$INTERFACE/brif/$bp/state" + read -t 1 NMAX < $SYSFS/$INTERFACE/bridge/forward_delay + while (((N+=1) < NMAX)) ; do + let STATE=0 + for bp in $SYSFS/$INTERFACE/brif/* ; do + test -e "$bp" || break 2 + let EMPTY++ + sf="$SYSFS/$INTERFACE/brif/${bp##*/}/state" test -e $sf || continue - S=`cat $sf` - if [ "$S" == 2 ] ; then - STATE=-1 + read -t 1 S < $sf + if ((S == 2 )) ; then + let STATE=-1 break fi - : $((STATE+=S)) + let STATE+=S done - test $EMPTY && break - test "$STATE" -gt 0 && break + ((STATE > 0)) && break # make a dot every 2nd second - test $DOTS -eq 0 && { mesg_n "." ; DOTS=1 ; } || DOTS=0 - sleep 1 + ((N%200 == 1)) && mesg_n "." + usleep 10000 done if test $EMPTY -eq 0 ; then mesg "- no ports in bridge." --- scripts/ifup-dhcp +++ scripts/ifup-dhcp 2009-04-30 14:44:26.019733965 +0200 @@ -557,9 +557,9 @@ case "$ACTION" in if ! is_iface_up $INTERFACE ; then ip link set $INTERFACE up ${MTU:+mtu $MTU} \ ${LLADDR:+address $LLADDR} $LINK_OPTIONS - for a in 1 2 3 4 5; do + for ((count=200; count >= 0; count--)) ; do is_iface_up $INTERFACE && break - sleep 1 + usleep 25000 done # (optionally) wait until a device is really configured @@ -629,8 +629,9 @@ case "$ACTION" in # # TODO: does one the actual clients still exit on infinite lease?? # (dhcpcd does not do this any more) - show_dots=true - for ((wab_cnt=0; wab_cnt<=${DHCLIENT_WAIT_AT_BOOT:-15}; wab_cnt++)); do + typeset -i wab_max=${DHCLIENT_WAIT_AT_BOOT:-15}; + let wab_max\*=10 + for ((wab_cnt=0; wab_cnt<=wab_max; wab_cnt++)); do for BOOTPROTO in ${BOOTPROTOS[@]} ; do case "$BOOTPROTO" in (dhcp4) @@ -640,7 +641,7 @@ case "$ACTION" in info=/var/lib/dhcpcd/dhcpcd-$INTERFACE.info if ! dhcpc4_on_iface -q ; then - [ $wab_cnt -lt 2 ] && message_n .\ .\ + ((wab_cnt== 0 || wab_cnt==10)) && message_n .\ .\ DHCP4_MESSAGE="DHCP4 client NOT running" DHCP4_STATUS=$R_NOTRUNNING continue @@ -672,7 +673,7 @@ case "$ACTION" in (dhclient) # TODO: parse the lease?! if ! dhcpc4_on_iface -q ; then - [ $wab_cnt -lt 2 ] && message_n .\ .\ + ((wab_cnt== 0 || wab_cnt==10)) && message_n .\ .\ DHCP4_MESSAGE="DHCP4 client NOT running" DHCP4_STATUS=$R_NOTRUNNING continue @@ -697,7 +698,7 @@ case "$ACTION" in ;; (dhcp6) if ! dhcpc6_on_iface -q ; then - [ $wab_cnt -lt 2 ] && message_n .\ .\ + ((wab_cnt== 0 || wab_cnt==10)) && message_n .\ .\ DHCP6_MESSAGE="DHCP6 client NOT running" DHCP6_STATUS=$R_NOTRUNNING continue @@ -724,8 +725,8 @@ case "$ACTION" in esac done if [ -z "$DHCP4_STATUS" -o -z "$DHCP6_STATUS" ] ; then - $show_dots && { show_dots=false ; message_n .\ ; } || show_dots=true - sleep 1 + ((wab_cnt % 20 == 1)) && message_n .\ + usleep 100000 fi done message " " --- tools/autoip.c +++ tools/autoip.c 2009-04-30 14:49:50.517901627 +0200 @@ -456,7 +456,7 @@ main(int argc, char **argv) int background = 0; int pid = 0; int query = 0; - int grace = 0; + unsigned long int grace = 0; myprgname = strrchr(argv[0], '/'); if (!myprgname || *++myprgname == 0) @@ -484,7 +484,12 @@ main(int argc, char **argv) background = 2; break; case 'g': - grace = atoi(optarg); + { + char *endptr; + grace = strtoul(optarg, &endptr, 10); + if (*endptr != '\0') + usage(); + } break; case 'm': probe_min = atoi(optarg); @@ -545,6 +550,15 @@ main(int argc, char **argv) pid = getpid(); } +#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 199309L) + grace *= 40; + if (!force) while (grace-- > 0) + { + const struct timespec req = {0, 25000000}; + check_if_good(sock4, myifname, 0); + nanosleep(&req, NULL); + } +#else while (grace > 0) { if (!force) @@ -552,6 +566,7 @@ main(int argc, char **argv) sleep(1); grace--; } +#endif if (!force) check_if_good(sock4, myifname, 0); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de