diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-02-24 14:40:10 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-02-24 14:40:10 -0500 |
commit | 64a72e65a43fccceab640a51cbabe2f3ffea22b6 (patch) | |
tree | 237aca3c028ea9a9274246b3aa43a572f242c7be | |
parent | Merge pull request #9 from chutz/lo-dont-need-localmount (diff) | |
download | netifrc-64a72e65a43fccceab640a51cbabe2f3ffea22b6.tar.gz netifrc-64a72e65a43fccceab640a51cbabe2f3ffea22b6.tar.bz2 netifrc-64a72e65a43fccceab640a51cbabe2f3ffea22b6.zip |
do not use `echo -n`
The -n option is not portable. Use printf instead.
-rw-r--r-- | net/ifconfig.sh.Linux.in | 2 | ||||
-rw-r--r-- | 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 |