mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-01 11:46:07 +02:00
allow mounting smbv1
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
bashio::log.info 'Mounting external hdd...'
|
bashio::log.info 'Mounting external hdd...'
|
||||||
|
|
||||||
|
# Allow SMB1
|
||||||
|
if bashio::config.true 'smbv1'; then
|
||||||
|
SMBVERS=",vers=1.0"
|
||||||
|
else
|
||||||
|
SMBVERS=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Mount local Share if configured and if Protection Mode is active
|
# Mount local Share if configured and if Protection Mode is active
|
||||||
if bashio::config.has_value 'localdisks'; then
|
if bashio::config.has_value 'localdisks'; then
|
||||||
MOREDISKS=$(bashio::config 'localdisks')
|
MOREDISKS=$(bashio::config 'localdisks')
|
||||||
@@ -37,7 +44,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
mkdir -p /storage/storagecifs
|
mkdir -p /storage/storagecifs
|
||||||
chown -R abc:abc /storage/storagecifs
|
chown -R abc:abc /storage/storagecifs
|
||||||
fi
|
fi
|
||||||
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs && \
|
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD$SMBVERS $disk /storage/storagecifs && \
|
||||||
bashio::log.info "Success!"
|
bashio::log.info "Success!"
|
||||||
else
|
else
|
||||||
mkdir -p /share/storagecifs$ITERATOR && \
|
mkdir -p /share/storagecifs$ITERATOR && \
|
||||||
@@ -46,7 +53,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
mkdir -p /storage/storagecifs$ITERATOR
|
mkdir -p /storage/storagecifs$ITERATOR
|
||||||
chown -R abc:abc /storage/storagecifs$ITERATOR
|
chown -R abc:abc /storage/storagecifs$ITERATOR
|
||||||
fi
|
fi
|
||||||
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs$ITERATOR && \
|
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD$SMBVERS $disk /storage/storagecifs$ITERATOR && \
|
||||||
bashio::log.info "Success!"
|
bashio::log.info "Success!"
|
||||||
fi
|
fi
|
||||||
ITERATOR=$((ITERATOR+1))
|
ITERATOR=$((ITERATOR+1))
|
||||||
|
|||||||
Reference in New Issue
Block a user