Module Name: src
Committed By: apb
Date: Tue Aug 12 08:32:43 UTC 2014
Modified Files:
src/usr.sbin/postinstall: postinstall
Log Message:
Quoting fixes in several eval commands.
To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/usr.sbin/postinstall/postinstall
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.177 src/usr.sbin/postinstall/postinstall:1.178
--- src/usr.sbin/postinstall/postinstall:1.177 Tue Aug 12 08:28:04 2014
+++ src/usr.sbin/postinstall/postinstall Tue Aug 12 08:32:43 2014
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall,v 1.177 2014/08/12 08:28:04 apb Exp $
+# $NetBSD: postinstall,v 1.178 2014/08/12 08:32:43 apb Exp $
#
# Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -186,7 +186,7 @@ additem()
{
[ $# -eq 2 ] || err 3 "USAGE: additem item description"
defaultitems="${defaultitems}${defaultitems:+ }$1"
- eval desc_$1=\"$2\"
+ eval desc_$1=\"\$2\"
}
# adddisableditem item description
@@ -197,7 +197,7 @@ adddisableditem()
{
[ $# -eq 2 ] || err 3 "USAGE: adddisableditem item description"
otheritems="${otheritems}${otheritems:+ }$1"
- eval desc_$1=\"$2\"
+ eval desc_$1=\"\$2\"
}
# checkdir op dir mode
@@ -430,7 +430,7 @@ rcvar_is_enabled()
_rcie_var="$1"
(
[ -f "${DEST_DIR}/etc/rc.conf" ] && . "${DEST_DIR}/etc/rc.conf"
- eval _rcie_val="\${${_rcie_var}}"
+ eval _rcie_val=\"\${${_rcie_var}}\"
case $_rcie_val in
# "yes", "true", "on", or "1"
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
@@ -524,7 +524,7 @@ obsolete_paths()
if [ "${op}" = "check" ]; then
msg "Remove obsolete ${ftype} ${ofile}"
failed=1
- elif ! eval "${cmd} \${ofile}"; then
+ elif ! eval "${cmd} \"\${ofile}\""; then
msg "Can't remove obsolete ${ftype} ${ofile}"
failed=1
else
@@ -718,7 +718,7 @@ get_makevar()
_value="$(echo '.include <bsd.own.mk>' | \
${MAKE} -f - -V "${_var}")"
- eval ${_var}=\"${_value}\"
+ eval ${_var}=\"\${_value}\"
done
}