diff options
author | 7heo <7heo@mail.com> | 2016-12-27 13:13:13 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-01-10 13:50:25 +0100 |
commit | 198b8db9fdffc7ecb4b354ff29a963d679166624 (patch) | |
tree | a6efa2ac4101b785391a2f8ed9990f7f70e479c5 | |
parent | 254c00aa7d6a4cbe8b4a0cb02fc2699d72a13cda (diff) | |
download | mkinitfs-198b8db9fdffc7ecb4b354ff29a963d679166624.tar.bz2 mkinitfs-198b8db9fdffc7ecb4b354ff29a963d679166624.tar.xz |
test: better messages
-rwxr-xr-x | test.sh | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2,6 +2,7 @@ set -e set -u +set -x # Defaults operation=full @@ -82,8 +83,8 @@ then echo "> Closing the device '/dev/mapper/temp-test'" sudo cryptsetup luksClose temp-test - echo "> Testing nfplug-findfs (passphrase was '$passphrase')" - sudo ./nlplug-findfs ${flags}-c $block -m 'test-device' || true + echo "> Testing nlplug-findfs on $block (passphrase was '$passphrase')" + echo "$passphrase" | sudo ./nlplug-findfs ${flags}-c $block -m 'test-device' echo "> Mounting the device" sudo mount /dev/mapper/test-device local-mount @@ -97,7 +98,7 @@ fi echo "> Cleaning up" mountpoint local-mount && sudo umount local-mount [ -b /dev/mapper/test-device ] && sudo cryptsetup luksClose test-device -for i in $(seq 0 $(sudo losetup -f | sed 's:^[a-z/]*\([0-9]*\)$:\1:; s/$/-1/' | bc)); do +for i in $(seq 0 $(($(sudo losetup -f | sed 's:^[a-z/]*\([0-9]*\)$:\1:; s/$/-1/')))); do sudo losetup -d /dev/loop$i done [ -d local-mount ] && rmdir local-mount |