diff options
-rwxr-xr-x | squashfu | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -37,7 +37,7 @@ do_backup () { # - Check for pre-existing mounts just in case (and unmount them) # - do we have a proper (expected) directory structure in place? # (Use cd to BKUP_ROOT to avoid issues with brace expansion in a quoted path) - [[ $UID -eq 0 ]] || die Must be root! + [[ $UID -eq 0 ]] || die "Must be root!" [[ -w "${BKUP_ROOT}" ]] || die "Backup root is not accessible. Please check your setting in /etc/squashfu" @@ -174,6 +174,7 @@ unmount_all () { unmount_custom () { # Unmount any custom mounts from rollback operations + debug "Checking for and unmounting user-specified mount points" [[ -f /tmp/squashfu.custom ]] && { while read mount; do umount $mount @@ -183,6 +184,7 @@ unmount_custom () { unmount_seed () { # Account for possibility of multiple mounts + debug "Checking for and unmounting seed" while [[ $(mountpoint -q "${BKUP_ROOT}/ro") ]]; do umount "${SEED}" done @@ -190,6 +192,7 @@ unmount_seed () { unmount_union () { # Account for possibility of multiple mounts + debug "Checking for and unmounting union" while [[ $(mountpoint -q "${BKUP_ROOT}/rw") ]]; do umount "${BKUP_ROOT}/rw" done @@ -309,4 +312,3 @@ while [[ $# -gt 0 ]]; do shift done - |