From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-802488-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 2DD10138CD3
	for <garchives@archives.gentoo.org>; Mon, 25 May 2015 10:01:21 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5BE69E08AD;
	Mon, 25 May 2015 10:01:19 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 007A2E08AD
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 May 2015 10:01:18 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 03EA6340A95
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 May 2015 10:01:18 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7FB469FB
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 May 2015 10:01:16 +0000 (UTC)
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" <vapier@gentoo.org>
Message-ID: <1424806810.64a72e65a43fccceab640a51cbabe2f3ffea22b6.vapier@OpenRC>
Subject: [gentoo-commits] proj/netifrc:master commit in: net/
X-VCS-Repository: proj/netifrc
X-VCS-Files: net/ifconfig.sh.Linux.in net/udhcpc.sh.Linux.in
X-VCS-Directories: net/
X-VCS-Committer: vapier
X-VCS-Committer-Name: Mike Frysinger
X-VCS-Revision: 64a72e65a43fccceab640a51cbabe2f3ffea22b6
X-VCS-Branch: master
Date: Mon, 25 May 2015 10:01:16 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 289c44e5-2b65-4bdf-8a7a-fe47829b1380
X-Archives-Hash: 6c86899fbef365bcb0093abf321b3c0d

commit:     64a72e65a43fccceab640a51cbabe2f3ffea22b6
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 24 19:40:10 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Feb 24 19:40:10 2015 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=64a72e65

do not use `echo -n`

The -n option is not portable.  Use printf instead.

 net/ifconfig.sh.Linux.in | 2 +-
 net/udhcpc.sh.Linux.in   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in
index b2203cb..3d91afa 100644
--- a/net/ifconfig.sh.Linux.in
+++ b/net/ifconfig.sh.Linux.in
@@ -81,7 +81,7 @@ _get_inet_address()
 	sed -n -e 's/.*\(inet addr:\|inet \)\([^ ]*\).*\(Mask:\|netmask \)\([^ ]*\).*/\2 \4/p')
 	[ -z "$1" ] && return 1
 
-	echo -n "$1"
+	printf '%s' "$1"
 	shift
 	echo "/$(_netmask2cidr "$1")"
 }

diff --git a/net/udhcpc.sh.Linux.in b/net/udhcpc.sh.Linux.in
index bb502e5..b6e0327 100644
--- a/net/udhcpc.sh.Linux.in
+++ b/net/udhcpc.sh.Linux.in
@@ -25,7 +25,7 @@ udhcpc_start()
 	# but it creates temporary files.
 	# We can move this stuff to udhcpc hook script to avoid that, should we do?
 	local conf="/var/run/udhcpc-${IFACE}.conf"
-	echo -n >"$conf"
+	>"$conf"
 	# Map some generic options to dhcpcd
 	for opt in ${opts}; do
 		case "${opt}" in