mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-13 16:34:22 +01:00
Update 92-smb_mounts_v1.3.sh
This commit is contained in:
@@ -32,12 +32,12 @@ if bashio::config.has_value 'networkdisks'; then
|
||||
|
||||
#Tries to mount with default options
|
||||
bashio::log.info "... trying to mount with default options"
|
||||
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$DOMAIN $disk /mnt/$diskname 2>ERRORCODE && MOUNTFAIL=false || MOUNTED=false
|
||||
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$DOMAIN $disk /mnt/$diskname 2>ERRORCODE && MOUNTED=true || MOUNTED=false
|
||||
|
||||
#If mounting failed, tries to force uid/gid 0/0
|
||||
if [ $MOUNTED = true ]; then
|
||||
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 2>ERRORCODE && MOUNTFAIL=false || MOUNTED=false
|
||||
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 2>ERRORCODE && MOUNTED=true || MOUNTED=false
|
||||
fi
|
||||
|
||||
#If mounting failed, tries to mount as NFS
|
||||
@@ -45,7 +45,7 @@ if bashio::config.has_value 'networkdisks'; then
|
||||
bashio::log.info "... mounts as NFS"
|
||||
disknfs=$(echo $disk | sed 's/^\///')
|
||||
disknfs=$(echo $disknfs | sed 's/^\///')
|
||||
mount -t nfs $disknfs /mnt/$diskname 2>ERRORCODE && MOUNTFAIL=false || MOUNTED=false
|
||||
mount -t nfs $disknfs /mnt/$diskname 2>ERRORCODE && MOUNTED=true || MOUNTED=false
|
||||
fi
|
||||
|
||||
# if Fail test different smb and sec versions
|
||||
|
||||
Reference in New Issue
Block a user