DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "TYPE" "ext3" $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found ext3 on $DEVICE" $DEVICE
+ts_device_has "TYPE" "ext3" $DEVICE || ts_die "Cannot found ext3 on $DEVICE" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# variant A)
$TS_CMD_MOUNT $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT $DEVICE 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 -L $LABEL $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "LABEL" $LABEL $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
ts_fstab_add "LABEL=$LABEL"
$TS_CMD_MOUNT $DEVICE 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has_uuid $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found UUID on $DEVICE" $DEVICE
+ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
UUID=$(ts_uuid_by_devname $DEVICE)
ts_fstab_add "UUID=$UUID"
$TS_CMD_MOUNT $DEVICE 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 -L $LABEL $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "LABEL" $LABEL $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
-ts_udev_dev_support "by-label" $LABEL
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# variant A)
$TS_CMD_MOUNT $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT -L $LABEL 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
# variant C)
$TS_CMD_MOUNT LABEL=$LABEL 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "C) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "C) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "C) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "C) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 -L $LABEL $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "LABEL" $LABEL $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
-ts_udev_dev_support "by-label" $LABEL
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# variant A)
$TS_CMD_MOUNT -L $LABEL 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT "LABEL=$LABEL" 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 -L $LABEL $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "LABEL" $LABEL $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
-ts_udev_dev_support "by-label" $LABEL
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
-ts_device_has_uuid $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found UUID on $DEVICE" $DEVICE
+ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
UUID=$(ts_uuid_by_devname $DEVICE)
# variant A)
$TS_CMD_MOUNT -L $LABEL 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT "LABEL=$LABEL" 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "TYPE" "ext3" $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found ext3 on $DEVICE" $DEVICE
+ts_device_has "TYPE" "ext3" $DEVICE || ts_die "Cannot found ext3 on $DEVICE" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# variant A) -- UID=0
$TS_CMD_MOUNT $LINKNAME 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $LINKNAME
-[ "$?" == "0" ] || ts_die "A) Cannot umount $LINKNAME" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $LINKNAME || ts_die "A) Cannot umount $LINKNAME" $DEVICE
# varian B)
ts_init_suid $TS_CMD_MOUNT
ts_init_suid $TS_CMD_UMOUNT
su $TS_TESTUSER -c "$TS_CMD_MOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-su $TS_TESTUSER -c "$TS_CMD_UMOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT
-[ "$?" == "0" ] || ts_die "B) Cannot umount $LINKNAME" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+su $TS_TESTUSER -c "$TS_CMD_UMOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT \
+ || ts_die "B) Cannot umount $LINKNAME" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has_uuid $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found UUID on $DEVICE" $DEVICE
+ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
UUID=$(ts_uuid_by_devname $DEVICE)
-ts_udev_dev_support "by-uuid" $UUID
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-uuid" $UUID || ts_skip "udev ignores /dev/loop*" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# varian A)
$TS_CMD_MOUNT $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# varian B)
$TS_CMD_MOUNT -U $UUID 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
# varian C)
$TS_CMD_MOUNT UUID=$UUID 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "C) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "C) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "C) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "C) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has_uuid $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found UUID on $DEVICE" $DEVICE
+ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
UUID=$(ts_uuid_by_devname $DEVICE)
-ts_udev_dev_support "by-uuid" $UUID
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-uuid" $UUID || ts_skip "udev ignores /dev/loop*" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# variant A)
$TS_CMD_MOUNT -U $UUID 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT "UUID=$UUID" 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 -L $LABEL $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "LABEL" $LABEL $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
-ts_udev_dev_support "by-label" $LABEL
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
-ts_device_has_uuid $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found UUID on $DEVICE" $DEVICE
+ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
UUID=$(ts_uuid_by_devname $DEVICE)
# variant A)
$TS_CMD_MOUNT -U $UUID 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT "UUID=$UUID" 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "TYPE" "ext3" $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found ext3 on $DEVICE" $DEVICE
+ts_device_has "TYPE" "ext3" $DEVICE || ts_die "Cannot found ext3 on $DEVICE" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
$TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot umount $DEVICE" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 -L $LABEL $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has "LABEL" $LABEL $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
-ts_udev_dev_support "by-label" $LABEL
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-label" $LABEL \
+ || ts_skip "udev ignores /dev/loop*" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# variant A)
$TS_CMD_MOUNT -L $LABEL $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT LABEL=$LABEL $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts \
+ || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext2 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext2 on $DEVICE" $DEVICE
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE" $DEVICE
# mount read-write
-$TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT
-[ "$?" == "0" ] || ts_die "Cannot mount $TS_MOUNTPOINT" $DEVICE
+$TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT || ts_die "Cannot mount $TS_MOUNTPOINT" $DEVICE
# check the mount
-egrep -q "^$DEVICE $TS_MOUNTPOINT" /etc/mtab
-[ "$?" == "0" ] || ts_die "Cannot found $TS_MOUNTPOINT in /etc/mtab" $DEVICE
+egrep -q "^$DEVICE $TS_MOUNTPOINT" /etc/mtab \
+ || ts_die "Cannot found $TS_MOUNTPOINT in /etc/mtab" $DEVICE
# remount
-$TS_CMD_MOUNT -o remount,ro $TS_MOUNTPOINT
-[ "$?" == "0" ] || ts_die "Cannot remount $TS_MOUNTPOINT" $DEVICE
+$TS_CMD_MOUNT -o remount,ro $TS_MOUNTPOINT \
+ || ts_die "Cannot remount $TS_MOUNTPOINT" $DEVICE
# check the remount
-egrep -q "^$DEVICE $TS_MOUNTPOINT ext2 ro 0 0" /etc/mtab
-[ "$?" == "0" ] || ts_die "Cannot found remounted $TS_MOUNTPOINT in /etc/mtab" $DEVICE
+egrep -q "^$DEVICE $TS_MOUNTPOINT ext2 ro 0 0" /etc/mtab \
+ || ts_die "Cannot found remounted $TS_MOUNTPOINT in /etc/mtab" $DEVICE
ts_device_deinit $DEVICE
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-mkfs.ext3 $DEVICE &> /dev/null
-[ "$?" == "0" ] || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
+mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE
-ts_device_has_uuid $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found UUID on $DEVICE" $DEVICE
+ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
UUID=$(ts_uuid_by_devname $DEVICE)
-ts_udev_dev_support "by-uuid" $UUID
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-uuid" $UUID \
+ || ts_skip "udev ignores /dev/loop*" $DEVICE
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
# variant A)
$TS_CMD_MOUNT -U $UUID $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "A) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "A) Cannot umount $DEVICE" $DEVICE
# variant B)
$TS_CMD_MOUNT UUID=$UUID $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/mounts
-[ "$?" == "0" ] || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-$TS_CMD_UMOUNT $DEVICE
-[ "$?" == "0" ] || ts_die "B) Cannot umount $DEVICE" $DEVICE
+grep -q $DEVICE /proc/mounts || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+$TS_CMD_UMOUNT $DEVICE || ts_die "B) Cannot umount $DEVICE" $DEVICE
ts_device_deinit $DEVICE
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-$TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT
-[ "$?" == "0" ] || ts_die "Cannot make swap $DEVICE" $DEVICE
+$TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT \
+ || ts_die "Cannot make swap $DEVICE" $DEVICE
-ts_device_has "TYPE" "swap" $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found swap on $DEVICE" $DEVICE
+ts_device_has "TYPE" "swap" $DEVICE || ts_die "Cannot found swap on $DEVICE" $DEVICE
$TS_CMD_SWAPON $DEVICE 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/swaps
-[ "$?" == "0" ] || ts_die "Cannot found $DEVICE in /proc/swaps" $DEVICE
+grep -q $DEVICE /proc/swaps || ts_die "Cannot found $DEVICE in /proc/swaps" $DEVICE
ts_swapoff $DEVICE
ts_device_deinit $DEVICE
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-$TS_CMD_MKSWAP -L $LABEL $DEVICE > /dev/null 2>> $TS_OUTPUT
-[ "$?" == "0" ] || ts_die "Cannot make swap on $DEVICE" $DEVICE
+$TS_CMD_MKSWAP -L $LABEL $DEVICE > /dev/null 2>> $TS_OUTPUT \
+ || ts_die "Cannot make swap on $DEVICE" $DEVICE
-ts_device_has "LABEL" $LABEL $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
-ts_udev_dev_support "by-label" $LABEL
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
$TS_CMD_SWAPON -L $LABEL 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/swaps
-[ "$?" == "0" ] || ts_die "Cannot found $DEVICE in /proc/swaps" $DEVICE
+grep -q $DEVICE /proc/swaps || ts_die "Cannot found $DEVICE in /proc/swaps" $DEVICE
ts_swapoff $DEVICE
ts_device_deinit $DEVICE
DEVICE=$(ts_device_init)
[ "$?" == 0 ] || ts_die "Cannot init device"
-$TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT
-[ "$?" == "0" ] || ts_die "Cannot make swap $DEVICE" $DEVICE
+$TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT \
+ || ts_die "Cannot make swap $DEVICE" $DEVICE
-ts_device_has_uuid $DEVICE
-[ "$?" == "0" ] || ts_die "Cannot found UUID on $DEVICE" $DEVICE
+ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
UUID=$(ts_uuid_by_devname $DEVICE)
-ts_udev_dev_support "by-uuid" $UUID
-[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
+ts_udev_dev_support "by-uuid" $UUID || ts_skip "udev ignores /dev/loop*" $DEVICE
$TS_CMD_SWAPON -U $UUID 2>&1 >> $TS_OUTPUT
-grep -q $DEVICE /proc/swaps
-[ "$?" == "0" ] || ts_die "Cannot found $DEVICE in /proc/swaps" $DEVICE
+grep -q $DEVICE /proc/swaps || ts_die "Cannot found $DEVICE in /proc/swaps" $DEVICE
ts_swapoff $DEVICE
ts_device_deinit $DEVICE