All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] busybox: port improvements to simple.script from Debian (udhcpc)
Date: Fri, 04 May 2012 10:22:32 -0700	[thread overview]
Message-ID: <4FA41058.7090204@linux.intel.com> (raw)
In-Reply-To: <1336136978-11081-1-git-send-email-obi@opendreambox.org>

On 05/04/2012 06:09 AM, Andreas Oberritter wrote:
> * Support resolvconf
> * Avoid bashism $((metric++))
> * Use 'domain' instead of 'search' for domain parameter
>
> Signed-off-by: Andreas Oberritter<obi@opendreambox.org>
> ---
> * This patch is based on the denzil branch.
> * This patch requires "busybox: remove unused patches for simple.script (udhcpc)",
>    because of the PR bump.
>
>   meta/recipes-core/busybox/busybox_1.19.4.bb   |    2 +-
>   meta/recipes-core/busybox/files/simple.script |   27 ++++++++++++++++++-------
>   2 files changed, 21 insertions(+), 8 deletions(-)
>
> diff --git a/meta/recipes-core/busybox/busybox_1.19.4.bb b/meta/recipes-core/busybox/busybox_1.19.4.bb
> index 30dd333..0b1e787 100644
> --- a/meta/recipes-core/busybox/busybox_1.19.4.bb
> +++ b/meta/recipes-core/busybox/busybox_1.19.4.bb
> @@ -1,5 +1,5 @@
>   require busybox.inc
> -PR = "r3"
> +PR = "r4"
>
>   SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
>              file://B921600.patch \
> diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
> index 5cc21b9..27368f0 100644
> --- a/meta/recipes-core/busybox/files/simple.script
> +++ b/meta/recipes-core/busybox/files/simple.script
> @@ -20,6 +20,9 @@ fi
>
>   case "$1" in
>   	deconfig)
> +		if [ -x /sbin/resolvconf ]; then
> +			/sbin/resolvconf -d "${interface}.udhcpc"
> +		fi
>   		if ! root_is_nfs ; then
>                           if [ $have_bin_ip -eq 1 ]; then
>                                   ip addr flush dev $interface
> @@ -53,19 +56,29 @@ case "$1" in
>   			metric=0
>   			for i in $router ; do
>                                   if [ $have_bin_ip -eq 1 ]; then
> -                                        ip route add default via $i metric $((metric++))
> +                                        ip route add default via $i metric $metric
>                                   else
> -                                        route add default gw $i dev $interface metric $((metric++)) 2>/dev/null
> +                                        route add default gw $i dev $interface metric $metric 2>/dev/null
>                                   fi
> +                                metric=$(($metric + 1))
>   			done
>   		fi
>
> -		echo -n>  $RESOLV_CONF
> -		[ -n "$domain" ]&&  echo search $domain>>  $RESOLV_CONF
> -		for i in $dns ; do
> -			echo adding dns $i
> -			echo nameserver $i>>  $RESOLV_CONF
> +		# Update resolver configuration file
> +		R=""
> +		[ -n "$domain" ]&&  R="domain $domain
> +"
> +		for i in $dns; do
> +			echo "$0: Adding DNS $i"
> +			R="${R}nameserver $i
> +"
>   		done
> +
> +		if [ -x /sbin/resolvconf ]; then
> +			echo -n "$R" | /sbin/resolvconf -a "${interface}.udhcpc"
> +		else
> +			echo -n "$R">  "$RESOLV_CONF"
> +		fi
>   		;;
>   esac
>

Merged into OE-Core

Thanks
	Sau!




      reply	other threads:[~2012-05-04 17:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 13:09 [PATCH] busybox: port improvements to simple.script from Debian (udhcpc) Andreas Oberritter
2012-05-04 17:22 ` Saul Wold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FA41058.7090204@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.