mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Remove basename(1). Clean up/shorten some coreutils pipelines
Basenames that remain, in cmd/zed/zed.d/statechange-led.sh:
dev=$(basename "$(echo "$therest" | awk '{print $(NF-1)}')")
vdev=$(basename "$ZEVENT_VDEV_PATH")
I don't wanna interfere with #11988
scripts/zfs-tests.sh:
SINGLETESTFILE=$(basename "$SINGLETEST")
tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list.kshlib:
ACTUAL=$(basename $dataset)
ACTUAL=$(basename $dataset)
tests/zfs-tests/tests/functional/cli_user/zpool_iostat/
zpool_iostat_-c_homedir.ksh:
typeset USER_SCRIPT=$(basename "$USER_SCRIPT_FULL")
tests/zfs-tests/tests/functional/cli_user/zpool_iostat/
zpool_iostat_-c_searchpath.ksh:
typeset CMD_1=$(basename "$SCRIPT_1")
typeset CMD_2=$(basename "$SCRIPT_2")
tests/zfs-tests/tests/functional/cli_user/zpool_status/
zpool_status_-c_homedir.ksh:
typeset USER_SCRIPT=$(basename "$USER_SCRIPT_FULL")
tests/zfs-tests/tests/functional/cli_user/zpool_status/
zpool_status_-c_searchpath.ksh
typeset CMD_1=$(basename "$SCRIPT_1")
typeset CMD_2=$(basename "$SCRIPT_2")
tests/zfs-tests/tests/functional/migration/migration.cfg:
export BNAME=`basename $TESTFILE`
tests/zfs-tests/tests/perf/perf.shlib:
typeset logbase="$(get_perf_output_dir)/$(basename \
tests/zfs-tests/tests/perf/perf.shlib:
typeset logbase="$(get_perf_output_dir)/$(basename \
These are potentially Of Directories, where basename is actually
useful
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12652
This commit is contained in:
@@ -252,7 +252,7 @@ function unmounted
|
||||
|
||||
function splitline
|
||||
{
|
||||
echo $1 | sed "s/,/ /g"
|
||||
echo $1 | tr ',' ' '
|
||||
}
|
||||
|
||||
function default_setup
|
||||
@@ -1092,9 +1092,7 @@ function get_endslice #<disk> <slice>
|
||||
case "$(uname)" in
|
||||
Linux)
|
||||
endcyl=$(parted -s $DEV_DSKDIR/$disk -- unit cyl print | \
|
||||
grep "part${slice}" | \
|
||||
awk '{print $3}' | \
|
||||
sed 's,cyl,,')
|
||||
awk "/part${slice}/"' {sub(/cyl/, "", $3); print $3}')
|
||||
((endcyl = (endcyl + 1)))
|
||||
;;
|
||||
FreeBSD)
|
||||
@@ -1461,7 +1459,7 @@ function is_shared_smb
|
||||
if datasetnonexists "$fs" ; then
|
||||
return 1
|
||||
else
|
||||
fs=$(echo $fs | sed 's@/@_@g')
|
||||
fs=$(echo $fs | tr / _)
|
||||
fi
|
||||
|
||||
if is_linux; then
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
verify_runnable "both"
|
||||
|
||||
fs=$TESTPOOL/$TESTFS/$(basename $0).$$
|
||||
fs=$TESTPOOL/$TESTFS/${0##*/}.$$
|
||||
|
||||
function cleanup
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user