mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Add logging to mountability verification.
This commit is contained in:
@@ -19,6 +19,8 @@ function check_archive_mountable () {
|
||||
|
||||
local test_mount_location="/tmp/archivetestmount"
|
||||
|
||||
echo "Verifying that the archive share is mountable..."
|
||||
|
||||
if [ ! -e "$test_mount_location" ]
|
||||
then
|
||||
mkdir "$test_mount_location"
|
||||
@@ -30,6 +32,8 @@ function check_archive_mountable () {
|
||||
/root/bin/write-archive-configs-to.sh "$tmp_credentials_file_path"
|
||||
|
||||
local mount_failed=false
|
||||
echo "Mount command-line: "
|
||||
echo "mount -t cifs //$archive_server_ip_address/$sharename $test_mount_location -o vers=${cifs_version},credentials=${tmp_credentials_file_path},iocharset=utf8,file_mode=0777,dir_mode=0777"
|
||||
mount -t cifs "//$archive_server_ip_address/$sharename" "$test_mount_location" -o "vers=${cifs_version},credentials=${tmp_credentials_file_path},iocharset=utf8,file_mode=0777,dir_mode=0777" || mount_failed=true
|
||||
|
||||
if [ "$mount_failed" = true ]
|
||||
@@ -40,6 +44,8 @@ function check_archive_mountable () {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "The archive share is mountable."
|
||||
|
||||
umount "$test_mount_location"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user