mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Update 92-smb_mounts.sh
This commit is contained in:
@@ -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 : $(<ERRORCODE)"
|
||||
rm ERRORCODE
|
||||
bashio::log.fatal "Error read : $(<ERRORCODE1)"
|
||||
bashio::log.fatal "Additional read : $(<ERRORCODE)"
|
||||
rm ERRORCODE*
|
||||
|
||||
# clean folder
|
||||
umount "/mnt/$diskname" 2>/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
|
||||
|
||||
Reference in New Issue
Block a user