diff options
author | Erich Eckner <git@eckner.net> | 2017-06-29 10:00:44 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-29 10:00:44 +0200 |
commit | 3339ed196df01429029861957ce3e53311f14767 (patch) | |
tree | 17b4eb248dc01a01b8f2ae68e039021d15fea401 /bin | |
parent | 0a9b49c48119892c259012085ee37442b6b1e45d (diff) | |
download | builder-3339ed196df01429029861957ce3e53311f14767.tar.xz |
bin/db-update: only umount if mounted
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/db-update | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/db-update b/bin/db-update index 5457dcb..0ee9020 100755 --- a/bin/db-update +++ b/bin/db-update @@ -369,7 +369,9 @@ fi tmp_dir="$(mktemp -d)" clean_up_lock_file() { - sudo /usr/bin/umount -l "${master_mirror_sshfs}" + if mountpoint "${master_mirror_sshfs}" > /dev/null 2>&1; then + sudo /usr/bin/umount -l "${master_mirror_sshfs}" + fi rm -f "${package_database_lock_file}" "${build_list_lock_file}" rm -rf --one-file-system "${tmp_dir}" } |