#
# Copyright (c) 2017 Datto, Inc. All rights reserved.
+# Copyright (c) 2019 DilOS
#
. $STF_SUITE/include/libtest.shlib
log_must zfs unload-key $TESTPOOL/$TESTFS1
log_must eval "echo $HEXKEY | zfs load-key $TESTPOOL/$TESTFS1"
-log_must eval "echo -n $RAWKEY | zfs change-key -o keyformat=raw" \
+log_must eval "printf '%s' $RAWKEY | zfs change-key -o keyformat=raw" \
"$TESTPOOL/$TESTFS1"
log_must verify_keyformat $TESTPOOL/$TESTFS1 "raw"
log_must zfs unload-key $TESTPOOL/$TESTFS1
-log_must eval "echo -n $RAWKEY | zfs load-key $TESTPOOL/$TESTFS1"
+log_must eval "printf '%s' $RAWKEY | zfs load-key $TESTPOOL/$TESTFS1"
log_pass "'zfs change-key -o' changes the key format"
#
# Copyright (c) 2017, Datto, Inc. All rights reserved.
+# Copyright (c) 2019, DilOS
#
. $STF_SUITE/include/libtest.shlib
while (( i < ${#ENCRYPTION_ALGS[*]} )); do
typeset -i j=0
while (( j < ${#KEYFORMATS[*]} )); do
- log_must eval "echo -n ${USER_KEYS[j]} | zfs create" \
+ log_must eval "printf '%s' ${USER_KEYS[j]} | zfs create" \
"-o ${ENCRYPTION_ALGS[i]} -o ${KEYFORMATS[j]}" \
"$TESTPOOL/$TESTFS1"
#
# Copyright (c) 2017, Datto, Inc. All rights reserved.
+# Copyright (c) 2019, DilOS
#
. $STF_SUITE/include/libtest.shlib
while (( i < ${#ENCRYPTION_ALGS[*]} )); do
typeset -i j=0
while (( j < ${#KEYFORMATS[*]} )); do
- log_must eval "echo -n ${USER_KEYS[j]} | zpool create" \
+ log_must eval "printf '%s' ${USER_KEYS[j]} | zpool create" \
"-O ${ENCRYPTION_ALGS[i]} -O ${KEYFORMATS[j]}" \
"$TESTPOOL $DISKS"
propertycheck $TESTPOOL ${ENCRYPTION_PROPS[i]} || \
log_fail "failed to set ${ENCRYPTION_ALGS[i]}"
- propertycheck $TESTPOOL ${KEY_FORMATS[j]} || \
+ propertycheck $TESTPOOL ${KEYFORMATS[j]} || \
log_fail "failed to set ${KEYFORMATS[j]}"
log_must zpool destroy $TESTPOOL