improve error handling

This commit is contained in:
Patrick Schleizer 2019-12-21 05:22:27 -05:00
parent 8919d38de9
commit 7aa7d0b5a0
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -67,10 +67,10 @@ remount_secure() {
if echo "$mount_output" | grep -q "$mount_folder " ; then
## Already mounted. Using remount.
mount -o "remount,${new_mount_options}" "$mount_folder"
mount -o "remount,${new_mount_options}" "$mount_folder" || exit_code=100
else
## Not yet mounted. Using mount bind.
mount -o "$new_mount_options" --bind "$mount_folder" "$mount_folder"
mount -o "$new_mount_options" --bind "$mount_folder" "$mount_folder" || exit_code=101
fi
touch "$status_file_full_path"