aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-30 09:23:02 -0600
committerDan McGee <dan@archlinux.org>2008-02-14 19:35:31 -0600
commit7b6fddfb12106c9485a9ceb8fa1876a501d1f181 (patch)
tree1dc5540e7a695141f0c163c094703fdfdc530c9c /network
parente3985084056bb80c886ea649674c3da5b906ccab (diff)
downloadinitscripts-7b6fddfb12106c9485a9ceb8fa1876a501d1f181.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'network')
-rwxr-xr-xnetwork11
1 files changed, 6 insertions, 5 deletions
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