Commit 75b6a374 authored by Jouke Witteveen's avatar Jouke Witteveen
Browse files

Improve quoting in eval statements

This covers some corner cases where, for instance, IFS does not contain
whitespace characters.
parent 4d18e145
......@@ -18,7 +18,7 @@ case $ACTION in
DhcpcdOptions+=" -K -L"
ip_set || exit 1
# Sandbox the eval
if ! ( eval $ExecUpPost ); then
if ! ( do_debug eval "$ExecUpPost" ); then
# Failing ExecUpPost will take the connection down
netctl-auto stop "$INTERFACE"
exit 1
......@@ -26,7 +26,7 @@ case $ACTION in
;;
DISCONNECT)
# Sandbox the eval
if ! ( eval $ExecDownPre ); then
if ! ( do_debug eval "$ExecDownPre" ); then
exit 1
fi
ip_unset
......
......@@ -93,7 +93,7 @@ timeout_wait() {
local timeout=$1
(( timeout *= 5 ))
shift
until eval "$*"; do
until eval "$@"; do
(( timeout-- > 0 )) || return 1
sleep 0.2
done
......
......@@ -49,7 +49,7 @@ case $1 in
fi
network_ready
# Sandbox the eval
if ! ( eval $ExecUpPost ); then
if ! ( do_debug eval "$ExecUpPost" ); then
report_error "ExecUpPost failed for network profile '$Profile'"
# Failing ExecUpPost will take the connection down
"${Connection}_down"
......@@ -61,7 +61,7 @@ case $1 in
stop)
report_notice "Stopping network profile '$Profile'..."
# Sandbox the eval
if ! ( eval $ExecDownPre ); then
if ! ( do_debug eval "$ExecDownPre" ); then
report_error "ExecDownPre failed for network profile '$Profile'"
# Failing ExecDownPre will leave the profile active
exit 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment