Skip to content
Snippets Groups Projects
Commit ad38ad49 authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

tests: only unmount backupdir if necessary

parent 10ed1b57
No related branches found
No related tags found
1 merge request!46Add a testsuite
......@@ -146,11 +146,11 @@ cleanup_backups() {
for c in "$@"; do
case "$c" in
"local")
umount "$BN_BACKUPDIR"
grep -q "^tmpfs $BN_BACKUPDIR" /proc/mounts && umount "$BN_BACKUPDIR"
mount -t tmpfs tmpfs "$BN_BACKUPDIR"
;;
"remote")
remote_command "sudo umount \"$BN_BACKUPDIR\""
remote_command "grep -q \"^tmpfs $BN_BACKUPDIR\" /proc/mounts && sudo umount \"$BN_BACKUPDIR\""
remote_command "sudo mount -t tmpfs tmpfs \"$BN_BACKUPDIR\""
;;
esac
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment