--- slmodem.orig 2004-08-04 03:30:15.000000000 -0400 +++ slmodem.echo+status 2004-08-05 11:50:49.405351624 -0400 @@ -33,27 +33,27 @@ if [ "$?" -gt 0 ] then eerror "Missing ${MODULE}. Please set up /etc/conf.d/slmodem" - eend 1; + return 1; fi #sleep as per http://bugs.gentoo.org/show_bug.cgi?id=47947#c59 ebegin "Waiting for ${MODULE} modem driver initialisation" local COUNT=0 - echo -e "${NORMAL} " - echo -ne "${NORMAL}" + # 52 in the line below is number of characters in ebegin statement + 7 + if [ "$RC_NOCOLOR" != "yes"]; then echo -ne "\e[A\e[52G"; fi while [ ! -c ${MDEV} -a ${COUNT} -lt 5 ]; do sleep 0.5 - echo -ne "." + echo -n "." COUNT=`expr ${COUNT} + 1` done - echo -ne "\n" + if [ "$RC_NOCOLOR" != "yes" ]; then echo; fi if [ ! -c ${MDEV} ]; then eerror "Module - ${MODULE} failed to initialise device ${MDEV}" - eend 1 + return 1 else eend 0 fi @@ -92,16 +92,16 @@ if [ ! "${MODULE}" == "alsa" ]; then ebegin "Waiting for ${MODULE} modem driver unload" - echo -e "${NORMAL} " - echo -ne "${NORMAL}" + # 44 is number of characters in ebegin statement + 7 + if [ "$RC_NOCOLOR" != "yes"]; then echo -ne "\e[A\e[44G"; fi for ((a=0,result=1; result==1 && a <= 5 ; a++)) do sleep 0.25 - echo -ne "." + echo -n "." modprobe -r slamr 2> /dev/null && result=0 done - echo -ne "\n" - eend ${result} + if [ "$RC_NOCOLOR" != "yes" ]; then echo; fi fi unlink ${LN_DEV} 2> /dev/null + eend ${result} }