Embed newlines in __IFS to save our identing
This commit is contained in:
parent
7d2c240c25
commit
05f119a78e
@ -39,8 +39,7 @@ bridge_pre_start() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for x in ${opts}; do
|
for x in ${opts}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
set -- ${x}
|
set -- ${x}
|
||||||
@ -49,12 +48,15 @@ bridge_pre_start() {
|
|||||||
set -- "${x}" "${IFACE}" "$@"
|
set -- "${x}" "${IFACE}" "$@"
|
||||||
brctl "$@"
|
brctl "$@"
|
||||||
done
|
done
|
||||||
|
unset IFS
|
||||||
|
|
||||||
if [ -n "${ports}" ] ; then
|
if [ -n "${ports}" ] ; then
|
||||||
einfo "Adding ports to ${IFACE}"
|
einfo "Adding ports to ${IFACE}"
|
||||||
eindent
|
eindent
|
||||||
|
|
||||||
|
local IFS="$__IFS"
|
||||||
for x in ${ports}; do
|
for x in ${ports}; do
|
||||||
|
unset IFS
|
||||||
ebegin "${x}"
|
ebegin "${x}"
|
||||||
ifconfig "${x}" promisc up
|
ifconfig "${x}" promisc up
|
||||||
if ! brctl addif "${IFACE}" "${x}" ; then
|
if ! brctl addif "${IFACE}" "${x}" ; then
|
||||||
@ -64,6 +66,7 @@ bridge_pre_start() {
|
|||||||
fi
|
fi
|
||||||
eend 0
|
eend 0
|
||||||
done
|
done
|
||||||
|
unset IFS
|
||||||
eoutdent
|
eoutdent
|
||||||
fi
|
fi
|
||||||
) || return 1
|
) || return 1
|
||||||
|
@ -56,16 +56,11 @@ ip6to4_start() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
veinfo "IPv4 address on ${host}: ${ip}/${subnet}"
|
veinfo "IPv4 address on ${host}: ${ip}/${subnet}"
|
||||||
local OIFS=$IFS SIFS=${IFS-y} ipa= ip6=
|
local ipa= ip6= IFS="${IFS}."
|
||||||
IFS="${IFS}."
|
for i in ${ip}; do
|
||||||
for i in ${ip} ; do
|
|
||||||
ipa="${ipa} ${i}"
|
ipa="${ipa} ${i}"
|
||||||
done
|
done
|
||||||
if [ "${SIFS}" = "y" ] ; then
|
unset IFS
|
||||||
IFS=$OIFS
|
|
||||||
else
|
|
||||||
unset IFS
|
|
||||||
fi
|
|
||||||
eval ip6="$(printf "2002:%02x%02x:%02x%02x::%s" ${ipa} ${suffix})"
|
eval ip6="$(printf "2002:%02x%02x:%02x%02x::%s" ${ipa} ${suffix})"
|
||||||
veinfo "Derived IPv6 address: ${ip6}"
|
veinfo "Derived IPv6 address: ${ip6}"
|
||||||
|
|
||||||
|
@ -118,8 +118,7 @@ iwconfig_user_config() {
|
|||||||
[ -z "${var}" ] && var=${IFVAR}
|
[ -z "${var}" ] && var=${IFVAR}
|
||||||
|
|
||||||
config="$(_get_array "iwconfig_${var}")"
|
config="$(_get_array "iwconfig_${var}")"
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for conf in ${config}; do
|
for conf in ${config}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
if ! eval iwconfig "${IFACE}" "${conf}" ; then
|
if ! eval iwconfig "${IFACE}" "${conf}" ; then
|
||||||
@ -130,8 +129,7 @@ iwconfig_user_config() {
|
|||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
config="$(_get_array "iwpriv_${var}")"
|
config="$(_get_array "iwpriv_${var}")"
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for conf in ${config}; do
|
for conf in ${config}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
if ! eval iwpriv "${IFACE}" "${conf}" ; then
|
if ! eval iwpriv "${IFACE}" "${conf}" ; then
|
||||||
@ -480,8 +478,7 @@ iwconfig_scan() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local blacklist="$(_get_array "blacklist_aps")"
|
local blacklist="$(_get_array "blacklist_aps")"
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for x in ${blacklist}; do
|
for x in ${blacklist}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
if [ "${x}" = "${s}" ] ; then
|
if [ "${x}" = "${s}" ] ; then
|
||||||
@ -500,8 +497,7 @@ iwconfig_force_preferred() {
|
|||||||
|
|
||||||
ewarn "Trying to force preferred in case they are hidden"
|
ewarn "Trying to force preferred in case they are hidden"
|
||||||
local pref="$(_get_array "preferred_aps")" ssid=
|
local pref="$(_get_array "preferred_aps")" ssid=
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for ssid in ${pref}; do
|
for ssid in ${pref}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
local found_AP=false i=0 e=
|
local found_AP=false i=0 e=
|
||||||
@ -526,8 +522,7 @@ iwconfig_force_preferred() {
|
|||||||
iwconfig_connect_preferred() {
|
iwconfig_connect_preferred() {
|
||||||
local ssid= i= mode= mac= enc= freq= chan=
|
local ssid= i= mode= mac= enc= freq= chan=
|
||||||
local pref="$(_get_array preferred_aps)"
|
local pref="$(_get_array preferred_aps)"
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for ssid in ${pref}; do
|
for ssid in ${pref}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
i=0
|
i=0
|
||||||
@ -557,8 +552,7 @@ iwconfig_connect_not_preferred() {
|
|||||||
eval e=\$SSID_${i}
|
eval e=\$SSID_${i}
|
||||||
if [ -n "${e}" ] ; then
|
if [ -n "${e}" ] ; then
|
||||||
local prefa="$(_get_array preferred_aps)"
|
local prefa="$(_get_array preferred_aps)"
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for ssid in ${prefa}; do
|
for ssid in ${prefa}; do
|
||||||
if [ "${e}" = "${ssid}" ] ; then
|
if [ "${e}" = "${ssid}" ] ; then
|
||||||
pref=true
|
pref=true
|
||||||
|
@ -124,16 +124,14 @@ pppd_pre_start() {
|
|||||||
[ -n "$2" ] && chatopts="${chatopts} -U '$2'"
|
[ -n "$2" ] && chatopts="${chatopts} -U '$2'"
|
||||||
local chat="$(_get_array "chat_${IFVAR}")"
|
local chat="$(_get_array "chat_${IFVAR}")"
|
||||||
if [ "${chat}" ] ; then
|
if [ "${chat}" ] ; then
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
opts="${opts} connect $(printf "\\'%s\\'" "${chatopts} $(printf "\\'\\\\'\\'%s\\'\\\'' " "$@")")"
|
opts="${opts} connect $(printf "\\'%s\\'" "${chatopts} $(printf "\\'\\\\'\\'%s\\'\\\'' " "$@")")"
|
||||||
unset IFS
|
unset IFS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add plugins
|
# Add plugins
|
||||||
local haspppoa=false haspppoe=false plugins="$(_get_array "plugins_${IFVAR}")"
|
local haspppoa=false haspppoe=false plugins="$(_get_array "plugins_${IFVAR}")"
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for i in ${plugins}; do
|
for i in ${plugins}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
set -- ${i}
|
set -- ${i}
|
||||||
|
@ -38,8 +38,7 @@ vlan_pre_start() {
|
|||||||
_exists || return 1
|
_exists || return 1
|
||||||
|
|
||||||
local v= x= e=
|
local v= x= e=
|
||||||
local IFS="
|
local IFS="$__IFS"
|
||||||
"
|
|
||||||
for v in ${vc}; do
|
for v in ${vc}; do
|
||||||
unset IFS
|
unset IFS
|
||||||
case "${v}" in
|
case "${v}" in
|
||||||
|
Loading…
Reference in New Issue
Block a user