mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-01 05:14:04 +02:00
Update 00-smb_mounts.sh
This commit is contained in:
@@ -19,7 +19,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
USERNAME=$(bashio::config 'cifsusername')
|
USERNAME=$(bashio::config 'cifsusername')
|
||||||
PASSWORD=$(bashio::config 'cifspassword')
|
PASSWORD=$(bashio::config 'cifspassword')
|
||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SMBDEFAULT=""
|
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
CHARSET=",iocharset=utf8"
|
CHARSET=",iocharset=utf8"
|
||||||
|
|
||||||
@@ -116,6 +115,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
# What is the SMB version
|
# What is the SMB version
|
||||||
echo "... detecting SMB version"
|
echo "... detecting SMB version"
|
||||||
# Extracting SMB versions and normalize output
|
# Extracting SMB versions and normalize output
|
||||||
|
# shellcheck disable=SC2210,SC2094
|
||||||
SMBVERS="$(nmap --script smb-protocols "$server" -p 445 2>1 | awk '/ [0-9]/' | awk '{print $NF}' | cut -c -3 | sort -V | tail -n 1 || true)"
|
SMBVERS="$(nmap --script smb-protocols "$server" -p 445 2>1 | awk '/ [0-9]/' | awk '{print $NF}' | cut -c -3 | sort -V | tail -n 1 || true)"
|
||||||
# Manage output
|
# Manage output
|
||||||
if [ -n "$SMBVERS" ]; then
|
if [ -n "$SMBVERS" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user