mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
ZTS: Fix a few defaults
Linux was missing a default value for DEV_DSKDIR. Set it to /dev. Fix resulting fallout. SLICE_PREFIX seems like a good candidate for including in the defaults. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #9898
This commit is contained in:
@@ -914,14 +914,15 @@ function set_partition
|
||||
typeset -i slicenum=$1
|
||||
typeset start=$2
|
||||
typeset size=$3
|
||||
typeset disk=$4
|
||||
typeset disk=${4#$DEV_DSKDIR/}
|
||||
disk=${disk#$DEV_RDSKDIR/}
|
||||
|
||||
case "$(uname)" in
|
||||
Linux)
|
||||
if [[ -z $size || -z $disk ]]; then
|
||||
log_fail "The size or disk name is unspecified."
|
||||
fi
|
||||
[[ -n $DEV_DSKDIR ]] && disk=$DEV_DSKDIR/$disk
|
||||
disk=$DEV_DSKDIR/$disk
|
||||
typeset size_mb=${size%%[mMgG]}
|
||||
|
||||
size_mb=${size_mb%%[mMgG][bB]}
|
||||
@@ -969,7 +970,7 @@ function set_partition
|
||||
if [[ -z $size || -z $disk ]]; then
|
||||
log_fail "The size or disk name is unspecified."
|
||||
fi
|
||||
[[ -n $DEV_DSKDIR ]] && disk=$DEV_DSKDIR/$disk
|
||||
disk=$DEV_DSKDIR/$disk
|
||||
|
||||
if [[ $slicenum -eq 0 ]] || ! gpart show $disk >/dev/null 2>&1; then
|
||||
gpart destroy -F $disk >/dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user