mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 23:55:56 +02:00
correct code
This commit is contained in:
@@ -37,18 +37,18 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
#Tries to force uid/gid 0/0
|
#Tries to force uid/gid 0/0
|
||||||
bashio::log.info "... trying to force uid 0 gid 0"
|
bashio::log.info "... trying to force uid 0 gid 0"
|
||||||
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=0,gid=0,forceuid,forcegid,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$DOMAIN $disk /mnt/$diskname
|
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=0,gid=0,forceuid,forcegid,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}"$DOMAIN $disk /mnt/$diskname
|
||||||
|
|
||||||
# if Fail test different smb and sec versions
|
# if Fail test different smb and sec versions
|
||||||
while [ $? -ne 0 ]; do
|
while [ $? -ne 0 ]; do
|
||||||
# Declare all possible options
|
# Declare all possible options
|
||||||
declare -a SMBVERSION=( ",vers=2.1" ",vers=3.0" ",vers=1.0" ",vers=3.1.1" ",vers=2.0" ",vers=3.0.2" )
|
declare -a SMBVERSION='( ",vers=2.1" ",vers=3.0" ",vers=1.0" ",vers=3.1.1" ",vers=2.0" ",vers=3.0.2" )'
|
||||||
declare -a SECVERSION=( ",sec=ntlmi" ",sec=ntlmv2" ",sec=ntlmv2i" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=ntlm" ",sec=krb5i" ",sec=krb5" )
|
declare -a SECVERSION='( ",sec=ntlmi" ",sec=ntlmv2" ",sec=ntlmv2i" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=ntlm" ",sec=krb5i" ",sec=krb5" )'
|
||||||
|
|
||||||
# Test all options until successful
|
# Test all options until successful
|
||||||
for SMBVERS in ${SMBVERSION[@]}; do
|
for SMBVERS in ${SMBVERSION[@]}; do
|
||||||
for SECVERS in ${SECVERSION[@]}; do
|
for SECVERS in ${SECVERSION[@]}; do
|
||||||
bashio::log.warning "... trying to mount with $SMBVERS $SECVERS "
|
bashio::log.warning "... trying to mount with $SMBVERS$SECVERS "
|
||||||
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}"$DOMAIN$SMBVERS $disk /mnt/$diskname || \
|
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}"$DOMAIN$SMBVERS $disk /mnt/$diskname || \
|
||||||
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}"$DOMAIN$SMBVERS$SECVERS $disk /mnt/$diskname
|
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}"$DOMAIN$SMBVERS$SECVERS $disk /mnt/$diskname
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user