ts_log "Initialize empty image"
TEST_IMAGE_NAME=$(ts_image_init 10)
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
# need to run init twice, to change system ID after new label, otherwise system
# ID will be random and will screw up md5's
ts_log "Create new DOS partition table"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create primary partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Set partition type"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CHANGE_PARTTYPE}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Set primary partition active"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Re-create primary partition"
echo -e "${FDISK_CMD_INIT}d\n${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create extended partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create logical partitions"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Delete logical partitions"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create another logical partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Delete primary partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Delete extended partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_finalize
ts_log "Initialize empty image"
TEST_IMAGE_NAME=$(ts_image_init 10)
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create new SUN partition table"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create first partition"
echo -e "${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Set partition sysid"
echo -e "${FDISK_CMD_CHANGE_SYSID}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Set first partition readonly"
echo -e "${FDISK_CMD_TOGGLE_READONLY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Set first partition mountable"
echo -e "${FDISK_CMD_TOGGLE_MOUNTABLE}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create second partition"
echo -e "${FDISK_CMD_CREATE_SECONDARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Delete all partitions"
echo -e "${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_finalize