From 7b6fddfb12106c9485a9ceb8fa1876a501d1f181 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 30 Nov 2007 09:23:02 -0600 Subject: Remove some bashisms from network, even though we cannot convert it Since netfs and network source rc.conf, we cannot fully convert it to an sh script. However, we can get rid of a few things that are not sh compatible. Signed-off-by: Dan McGee --- network | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'network') diff --git a/network b/network index fbe77d8..81996ef 100755 --- a/network +++ b/network @@ -30,7 +30,8 @@ ifup() eval ifcfg="\$${1}" if [ "$ifcfg" = "dhcp" ]; then # remove the .pid file if it exists - rm -f /var/run/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1 + rm -f /var/run/dhcpcd-${1}.pid >/dev/null 2>&1 + rm -f /var/run/dhcpcd-${1}.cache >/dev/null 2>&1 /sbin/dhcpcd $DHCPCD_ARGS ${1} else /sbin/ifconfig $ifcfg @@ -59,9 +60,9 @@ iflist() { for ifline in ${INTERFACES[@]}; do if [ "$ifline" = "${ifline#!}" ]; then - echo -en " $ifline:\t" + printf " $ifline:\t" else - echo -en "$ifline:\t" + printf "$ifline:\t" fi eval real_ifline=\$${ifline#!} echo $real_ifline @@ -94,9 +95,9 @@ rtlist() { for rtline in ${ROUTES[@]}; do if [ "$rtline" = "${rtline#!}" ]; then - echo -en " $rtline:\t" + printf " $rtline:\t" else - echo -en "$rtline:\t" + printf "$rtline:\t" fi eval real_rtline=\$${rtline#!} echo $real_rtline -- cgit v1.2.3