From e17578a273cfc09c277477d962720f1f64cd9c0e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 10 Oct 2022 21:19:19 +0200 Subject: [PATCH] Update 92-smb_mounts.sh --- .templates/92-smb_mounts.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.templates/92-smb_mounts.sh b/.templates/92-smb_mounts.sh index e0be8e25d..7c02873f5 100644 --- a/.templates/92-smb_mounts.sh +++ b/.templates/92-smb_mounts.sh @@ -63,7 +63,7 @@ if bashio::config.has_value 'networkdisks'; then # Tries to mount with default options # shellcheck disable=SC2140 - mount -t cifs -o rw,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}$DOMAIN$PUID$PGID" "$disk" /mnt/"$diskname" 2>ERRORCODE && MOUNTED=true || MOUNTED=false + mount -t cifs -o rw,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}$DOMAIN$PUID$PGID" "$disk" /mnt/"$diskname" 2>ERRORCODE1 && MOUNTED=true || MOUNTED=false # if Fail test different smb and sec versions if [ "$MOUNTED" = false ]; then @@ -112,8 +112,9 @@ if bashio::config.has_value 'networkdisks'; then smbclient -L $disk -U "$CIFS_USERNAME%$CIFS_PASSWORD" || true # Error code - bashio::log.fatal "Error read : $(/dev/null || true @@ -122,6 +123,6 @@ if bashio::config.has_value 'networkdisks'; then done - if [ -f ERRORCODE ]; then rm ERRORCODE; fi + if [ -f ERRORCODE ]; then rm ERRORCODE*; fi fi