diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-06-04 15:45:08 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-06-05 16:50:13 +0200 |
commit | 168ccb879f48b0051c2abd184c78154ab17af0fd (patch) | |
tree | a1279c53248718d1d7cfbd7abc45b41bc5c57931 /test/TEST-24-CRYPTSETUP/test.sh | |
parent | test: minor cleanup (diff) | |
download | systemd-168ccb879f48b0051c2abd184c78154ab17af0fd.tar.xz systemd-168ccb879f48b0051c2abd184c78154ab17af0fd.zip |
test: clean up the test cleanup a bit
Diffstat (limited to '')
-rwxr-xr-x | test/TEST-24-CRYPTSETUP/test.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/TEST-24-CRYPTSETUP/test.sh b/test/TEST-24-CRYPTSETUP/test.sh index c7e024ffed..9bfbeac80c 100755 --- a/test/TEST-24-CRYPTSETUP/test.sh +++ b/test/TEST-24-CRYPTSETUP/test.sh @@ -62,6 +62,7 @@ test_create_image() { mkdir -p "$STATEDIR/keydev" mount "$STATEDIR/keydev.img" "$STATEDIR/keydev" echo -n test >"$STATEDIR/keydev/keyfile" + sync "$STATEDIR/keydev" umount "$STATEDIR/keydev" cat >>"$initdir/etc/fstab" <<EOF @@ -98,9 +99,9 @@ EOF } cleanup_root_var() { - ddebug "umount ${initdir:?}/var" - mountpoint "$initdir/var" && umount "$initdir/var" + mountpoint -q "$initdir/var" && umount "$initdir/var" [[ -b "/dev/mapper/${DM_NAME:?}" ]] && cryptsetup luksClose "/dev/mapper/$DM_NAME" + mountpoint -q "${STATEDIR:?}/keydev" && umount "$STATEDIR/keydev" } test_cleanup() { |