mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-16 19:10:32 +02:00
Allow multiple mounts
https://github.com/alexbelgium/hassio-addons/issues/786
This commit is contained in:
@@ -11,7 +11,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
MOREDISKS=$(bashio::config 'networkdisks')
|
MOREDISKS=$(bashio::config 'networkdisks')
|
||||||
CIFS_USERNAME=$(bashio::config 'cifsusername')
|
CIFS_USERNAME=$(bashio::config 'cifsusername')
|
||||||
CIFS_PASSWORD=$(bashio::config 'cifspassword')
|
CIFS_PASSWORD=$(bashio::config 'cifspassword')
|
||||||
MOUNTED=false
|
|
||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
@@ -50,6 +50,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
disk="${disk//"\040"/ }" #replace \040 with
|
disk="${disk//"\040"/ }" #replace \040 with
|
||||||
diskname="${disk//\\//}" #replace \ with /
|
diskname="${disk//\\//}" #replace \ with /
|
||||||
diskname="${diskname##*/}" # Get only last part of the name
|
diskname="${diskname##*/}" # Get only last part of the name
|
||||||
|
MOUNTED=false
|
||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user