Embed newlines in __IFS to save our identing

This commit is contained in:
Roy Marples 2007-10-30 11:38:23 +00:00
parent 7d2c240c25
commit 05f119a78e
5 changed files with 17 additions and 28 deletions

View File

@ -39,8 +39,7 @@ bridge_pre_start() {
fi
fi
local IFS="
"
local IFS="$__IFS"
for x in ${opts}; do
unset IFS
set -- ${x}
@ -49,12 +48,15 @@ bridge_pre_start() {
set -- "${x}" "${IFACE}" "$@"
brctl "$@"
done
unset IFS
if [ -n "${ports}" ] ; then
einfo "Adding ports to ${IFACE}"
eindent
local IFS="$__IFS"
for x in ${ports}; do
unset IFS
ebegin "${x}"
ifconfig "${x}" promisc up
if ! brctl addif "${IFACE}" "${x}" ; then
@ -64,6 +66,7 @@ bridge_pre_start() {
fi
eend 0
done
unset IFS
eoutdent
fi
) || return 1

View File

@ -56,16 +56,11 @@ ip6to4_start() {
esac
veinfo "IPv4 address on ${host}: ${ip}/${subnet}"
local OIFS=$IFS SIFS=${IFS-y} ipa= ip6=
IFS="${IFS}."
for i in ${ip} ; do
local ipa= ip6= IFS="${IFS}."
for i in ${ip}; do
ipa="${ipa} ${i}"
done
if [ "${SIFS}" = "y" ] ; then
IFS=$OIFS
else
unset IFS
fi
unset IFS
eval ip6="$(printf "2002:%02x%02x:%02x%02x::%s" ${ipa} ${suffix})"
veinfo "Derived IPv6 address: ${ip6}"

View File

@ -118,8 +118,7 @@ iwconfig_user_config() {
[ -z "${var}" ] && var=${IFVAR}
config="$(_get_array "iwconfig_${var}")"
local IFS="
"
local IFS="$__IFS"
for conf in ${config}; do
unset IFS
if ! eval iwconfig "${IFACE}" "${conf}" ; then
@ -130,8 +129,7 @@ iwconfig_user_config() {
unset IFS
config="$(_get_array "iwpriv_${var}")"
local IFS="
"
local IFS="$__IFS"
for conf in ${config}; do
unset IFS
if ! eval iwpriv "${IFACE}" "${conf}" ; then
@ -480,8 +478,7 @@ iwconfig_scan() {
fi
local blacklist="$(_get_array "blacklist_aps")"
local IFS="
"
local IFS="$__IFS"
for x in ${blacklist}; do
unset IFS
if [ "${x}" = "${s}" ] ; then
@ -500,8 +497,7 @@ iwconfig_force_preferred() {
ewarn "Trying to force preferred in case they are hidden"
local pref="$(_get_array "preferred_aps")" ssid=
local IFS="
"
local IFS="$__IFS"
for ssid in ${pref}; do
unset IFS
local found_AP=false i=0 e=
@ -526,8 +522,7 @@ iwconfig_force_preferred() {
iwconfig_connect_preferred() {
local ssid= i= mode= mac= enc= freq= chan=
local pref="$(_get_array preferred_aps)"
local IFS="
"
local IFS="$__IFS"
for ssid in ${pref}; do
unset IFS
i=0
@ -557,8 +552,7 @@ iwconfig_connect_not_preferred() {
eval e=\$SSID_${i}
if [ -n "${e}" ] ; then
local prefa="$(_get_array preferred_aps)"
local IFS="
"
local IFS="$__IFS"
for ssid in ${prefa}; do
if [ "${e}" = "${ssid}" ] ; then
pref=true

View File

@ -124,16 +124,14 @@ pppd_pre_start() {
[ -n "$2" ] && chatopts="${chatopts} -U '$2'"
local chat="$(_get_array "chat_${IFVAR}")"
if [ "${chat}" ] ; then
local IFS="
"
local IFS="$__IFS"
opts="${opts} connect $(printf "\\'%s\\'" "${chatopts} $(printf "\\'\\\\'\\'%s\\'\\\'' " "$@")")"
unset IFS
fi
# Add plugins
local haspppoa=false haspppoe=false plugins="$(_get_array "plugins_${IFVAR}")"
local IFS="
"
local IFS="$__IFS"
for i in ${plugins}; do
unset IFS
set -- ${i}

View File

@ -38,8 +38,7 @@ vlan_pre_start() {
_exists || return 1
local v= x= e=
local IFS="
"
local IFS="$__IFS"
for v in ${vc}; do
unset IFS
case "${v}" in