From d38f78935caf06af6c60dc6c26df1f35831f8118 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 10 Dec 2023 08:41:28 +0100 Subject: [PATCH] Update 00-smb_mounts.sh https://github.com/alexbelgium/hassio-addons/issues/1120 --- .templates/00-smb_mounts.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index 0f0744df1..2d03d13bb 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -10,7 +10,7 @@ set -e if bashio::config.has_value 'networkdisks'; then # Alert message that it is a new code - if [[ "$(date +"%Y%m%d")" -lt "20240101" ]]; then + if [[ "$(date +"%Y%m%d")" -lt "20240201" ]]; then bashio::log.warning "------------------------" bashio::log.warning "This is a new code, please report any issues on https://github.com/alexbelgium/hassio-addons" bashio::log.warning "------------------------" @@ -87,7 +87,7 @@ if bashio::config.has_value 'networkdisks'; then && MOUNTED=true && MOUNTOPTIONS="$SMBVERS$SECVERS$PUID$PGID$CHARSET$DOMAIN" || MOUNTED=false # Deeper analysis if failed - if [ "$MOUNTED" = false ]; then + if [ "$MOUNTED" = false ]; then # Extract ip part of server for further manipulation server="$(echo "$disk" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")" @@ -105,7 +105,7 @@ if bashio::config.has_value 'networkdisks'; then continue fi else - echo "... $server is reachable" + echo "... $server is confirmed reachable" fi # Are credentials correct @@ -128,7 +128,7 @@ if bashio::config.has_value 'networkdisks'; then echo "... testing path" bashio::log.fatal "No shares found. Invalid or inaccessible SMB path?" else - echo "... valid credentials" + echo "... credentials are valid" fi # Extracting SMB versions and normalize output @@ -150,7 +150,7 @@ if bashio::config.has_value 'networkdisks'; then SMBVERS="3.1.1" ;; esac - echo "... SMB version $SMBVERS detected" + echo "... SMB version detected : $SMBVERS" SMBVERS=",vers=$SMBVERS" elif smbclient -t 2 -L "$server" -m NT1 -N $DOMAINCLIENT &>/dev/null; then echo "... SMB version : only SMBv1 is supported, this can lead to issues"