summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh
diff options
context:
space:
mode:
authorjpaetzel <jpaetzel@FreeBSD.org>2011-03-27 16:57:54 +0000
committerjpaetzel <jpaetzel@FreeBSD.org>2011-03-27 16:57:54 +0000
commitc0b9051b174edd52b1c981a25a28d77d5133a049 (patch)
tree7685cacc260db6392774e2cc0fe2507f4afd24ba /usr.sbin/pc-sysinstall/backend/functions-installpackages.sh
parent79f5bd9d163ed51b54be37305ac97c975667db20 (diff)
downloadFreeBSD-src-c0b9051b174edd52b1c981a25a28d77d5133a049.zip
FreeBSD-src-c0b9051b174edd52b1c981a25a28d77d5133a049.tar.gz
Fix a syntax error in a little-used function.
Replace expr with $(()) Replace grep > /dev/null with grep -q Replace "$?" = "0" with $? -eq 0 in tests Consolidate export statements with variable assignment Replace tests for ! -z with -n Approved by: kib (mentor)
Diffstat (limited to 'usr.sbin/pc-sysinstall/backend/functions-installpackages.sh')
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-installpackages.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh b/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh
index 3e0a4ba..7572efb 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh
@@ -36,8 +36,8 @@ determine_package_dependencies()
local PKGNAME="${1}"
local DEPFILE="${2}"
- grep "${PKGNAME}" "${DEPFILE}" >/dev/null
- if [ "$?" -ne "0" ]
+ grep -q "${PKGNAME}" "${DEPFILE}"
+ if [ $? -ne 0 ]
then
echo "${PKGNAME}" >> "${DEPFILE}"
get_package_dependencies "${PKGNAME}" "1"
@@ -78,7 +78,7 @@ install_packages()
{
# First, lets check and see if we even have any packages to install
get_value_from_cfg installPackages
- if [ ! -z "${VAL}" ]
+ if [ -n "${VAL}" ]
then
HERE=`pwd`
rc_nohalt "mkdir -p ${FSMNT}/${PKGTMPDIR}"
OpenPOWER on IntegriCloud