tests: avoid sed -E
GNU sed's -E option for BSD compatibility is relatively new (>=4.2) and undocumented. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
parent
e03f29b694
commit
e2142701ac
|
@ -33,7 +33,7 @@ fi
|
|||
test_flag() {
|
||||
echo "options: $*" >> $TS_OUTPUT
|
||||
$TS_CMD_UUIDD -s $UUIDD_SOCKET $* |
|
||||
sed -E '/List of UUIDs:/d; s/^[[:space:]]+//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT
|
||||
sed '/List of UUIDs:/d; s/^[[:space:]]*//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT
|
||||
$TS_HELPER_UUID_PARSER "$OUTPUT_FILE" >> $TS_OUTPUT 2>&1
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
|
|
|
@ -20,7 +20,7 @@ $TS_CMD_WIPEFS --all --backup ${TS_DEVICE} &>/dev/null || ts_die "wipefs failed"
|
|||
|
||||
#there should be just one magic string/backup file in this case
|
||||
INFILE=$(ls $HOME/wipefs-$(basename ${TS_DEVICE})-*.bak)
|
||||
OFFT=$(echo $INFILE | sed -E 's/^.*-(.*).bak$/\1/')
|
||||
OFFT=$(echo $INFILE | sed 's/^.*-\(.*\).bak$/\1/')
|
||||
dd if=$INFILE of=$TS_DEVICE bs=1 conv=notrunc seek=$(($OFFT)) &>/dev/null
|
||||
|
||||
#the bytes should be copied back, check if wipefs can recognize it
|
||||
|
|
Loading…
Reference in New Issue