Module Name: src
Committed By: kre
Date: Mon Oct 8 14:09:38 UTC 2018
Modified Files:
src/external/bsd/openresolv/dist: resolvconf.in
Log Message:
PR port-evbarm/53661 (which has nothing particular to do with port-evbarm)
When eval'ing RESTARTCMD don't field split it, only to join the words
again (by eval) - that converts newlines and tabs to spaces, and the
first of those causes sh syntax errors with the way that the various
RESTARTCMDs are now written (but it was always dangerous, as filename
expansions could also have happened, which is not wanted, I believe.)
Also correct a translation error.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/openresolv/dist/resolvconf.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/openresolv/dist/resolvconf.in
diff -u src/external/bsd/openresolv/dist/resolvconf.in:1.3 src/external/bsd/openresolv/dist/resolvconf.in:1.4
--- src/external/bsd/openresolv/dist/resolvconf.in:1.3 Tue Sep 25 05:57:46 2018
+++ src/external/bsd/openresolv/dist/resolvconf.in Mon Oct 8 14:09:38 2018
@@ -329,11 +329,11 @@ detect_init()
fi'
elif [ -x /usr/sbin/service ]; then
# Could be FreeBSD
- RESTARTCMD='
- if /usr/sbin/service $1 $status >/dev/null 2>&1
+ RESTARTCMD="
+ if /usr/sbin/service \$1 $status >/dev/null 2>&1
then
- /usr/sbin/service $1 restart
- fi'
+ /usr/sbin/service \$1 restart
+ fi"
elif [ -x /bin/sv ]; then
RESTARTCMD='/bin/sv status $1 >/dev/null 2>&1 &&
/bin/sv try-restart $1'
@@ -697,7 +697,7 @@ if [ "$cmd" = r ] || [ "$cmd" = R ]; the
detect_init || exit 1
if [ "$cmd" = r ]; then
set -- $args
- eval $RESTARTCMD
+ eval "$RESTARTCMD"
else
echo "$RESTARTCMD"
fi