summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcmd/zpool_id/zpool_id7
-rwxr-xr-xcmd/zpool_layout/zpool_layout2
2 files changed, 5 insertions, 4 deletions
diff --git a/cmd/zpool_id/zpool_id b/cmd/zpool_id/zpool_id
index c3637847a..f74504cfb 100755
--- a/cmd/zpool_id/zpool_id
+++ b/cmd/zpool_id/zpool_id
@@ -2,7 +2,7 @@
CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
PATH_ID=${PATH_ID:-/lib/udev/path_id}
-AWK=${AWK:-/bin/awk}
+AWK=${AWK:-/usr/bin/awk}
die() {
echo "Error: $*"
@@ -47,8 +47,9 @@ eval `${PATH_ID} ${DEVICE}`
# configuration file which is of the format <device id> <key>.
# Lines starting with #'s are treated as comments and ignored.
# Exact matches are required, wild cards are not supported,
-# and only the first match is returned.
-ID_ZPOOL=`${AWK} "/${ID_PATH}\>/ && !/^#/ { print \\$1; exit }" ${CONFIG}`
+# and only the first match is returned. Also note the following
+# regex pattern only appears to work with gawk, not mawk or awk.
+ID_ZPOOL=`${AWK} "/\<${ID_PATH}\>/ && !/^#/ { print \\$1; exit }" ${CONFIG}`
[ -z ${ID_ZPOOL} ] && die "Missing ID_ZPOOL for ID_PATH: ${ID_PATH}"
if [ ${ID_ZPOOL} ]; then
diff --git a/cmd/zpool_layout/zpool_layout b/cmd/zpool_layout/zpool_layout
index 7f19dc0e9..26d3ec265 100755
--- a/cmd/zpool_layout/zpool_layout
+++ b/cmd/zpool_layout/zpool_layout
@@ -12,7 +12,7 @@
# /etc/zfs/zdev.conf file, it allows the by-path naming convertion
# to change and still keep the simple <channel><rank> naming.
#
-AWK=${AWK:-/bin/awk}
+AWK=${AWK:-/usr/bin/awk}
CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
BUSES=( 01 02 03 )
PORTS=( 4 0 )