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