summaryrefslogtreecommitdiff
path: root/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh')
-rw-r--r--usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh b/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh
index f8a1851781..2026cac20a 100644
--- a/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh
+++ b/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh
@@ -15,7 +15,7 @@
# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2016 Nexenta Systems, Inc.
-# Copyright 2018 Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
#
export PATH="/usr/bin"
@@ -130,17 +130,17 @@ function constrain_path
# Special case links
ln -s /usr/gnu/bin/dd $PATHDIR/gnu_dd
- # SmartOS does not ship sudo or truncate. Link to them in the
- # package manager's namespace.
- if [[ ! -x $PATHDIR/sudo ]]; then
- rm $PATHDIR/sudo && ln -s /opt/local/bin/sudo $PATHDIR/sudo ||
- fail "Couldn't link sudo"
- fi
- if [[ ! -x $PATHDIR/truncate ]]; then
- rm $PATHDIR/truncate &&
- ln -s /opt/local/bin/truncate $PATHDIR/truncate ||
- fail "Couldn't link truncate"
- fi
+ # SmartOS does not ship some required packages by default.
+ # Link to them in the package manager's namespace.
+ pkgsrc_bin=/opt/local/bin
+ pkgsrc_packages="sudo truncate python base64"
+ for pkg in $pkgsrc_packages; do
+ if [[ ! -x $PATHDIR/$pkg ]]; then
+ rm $PATHDIR/$pkg &&
+ ln -s $pkgsrc_bin/$pkg $PATHDIR/$pkg ||
+ fail "Couldn't link $pkg"
+ fi
+ done
}
constrain_path