mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-03 16:07:51 +00:00
Merge pull request #1927 from MilhouseVH/le90_settings_workgroup_minmax
LibreELEC-settings: add support for workgroup, server min/max proto s…
This commit is contained in:
commit
9df623bd6d
@ -17,8 +17,8 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="LibreELEC-settings"
|
PKG_NAME="LibreELEC-settings"
|
||||||
PKG_VERSION="a40fb4f"
|
PKG_VERSION="01efc55"
|
||||||
PKG_SHA256="18aab9ae524443de9992cc6d293c7023a453c3f68bc0e7f29db3dcfd77c41dc6"
|
PKG_SHA256="1dc7d026f2bec6f068c8fce38e5a61efdb17bc49cf2f0e535e103b63d46a5fa4"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="prop."
|
PKG_LICENSE="prop."
|
||||||
PKG_SITE="https://libreelec.tv"
|
PKG_SITE="https://libreelec.tv"
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
[global]
|
[global]
|
||||||
server string = LibreELEC
|
server string = LibreELEC
|
||||||
workgroup = WORKGROUP
|
|
||||||
browseable = yes
|
browseable = yes
|
||||||
writeable = yes
|
writeable = yes
|
||||||
printable = no
|
printable = no
|
||||||
|
@ -2,3 +2,6 @@ SAMBA_AUTOSHARE="true"
|
|||||||
SAMBA_USERNAME="libreelec"
|
SAMBA_USERNAME="libreelec"
|
||||||
SAMBA_PASSWORD="libreelec"
|
SAMBA_PASSWORD="libreelec"
|
||||||
SAMBA_SECURE="false"
|
SAMBA_SECURE="false"
|
||||||
|
SAMBA_MINPROTOCOL="SMB2"
|
||||||
|
SAMBA_MAXPROTOCOL="SMB3"
|
||||||
|
SAMBA_WORKGROUP="WORKGROUP"
|
||||||
|
@ -35,6 +35,21 @@ if [ "$SAMBA_AUTOSHARE" == "true" ] ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ADD_CONFIG=
|
||||||
|
|
||||||
|
# If workgroup is not set, don't set it - who knows, user may know better.
|
||||||
|
if [ -n "$SAMBA_WORKGROUP" ]; then
|
||||||
|
# Remove any existing workgroup setting
|
||||||
|
sed -E '/^[[:space:]]*workgroup[[:space:]]*=/d' -i $SMB_CONF
|
||||||
|
ADD_CONFIG="${ADD_CONFIG} workgroup = ${SAMBA_WORKGROUP:-WORKGROUP}\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ADD_CONFIG="${ADD_CONFIG} server min protocol = ${SAMBA_MINPROTOCOL/SMB1/NT1}\n"
|
||||||
|
ADD_CONFIG="${ADD_CONFIG} server max protocol = ${SAMBA_MAXPROTOCOL/SMB1/NT1}\n"
|
||||||
|
|
||||||
|
# Add extra config after [global], escaping spaces so that all are retained by sed
|
||||||
|
sed -e "/\[global\]/ a ${ADD_CONFIG// /\\ }" -i $SMB_CONF
|
||||||
|
|
||||||
# only letters & numbers permitted for username & password
|
# only letters & numbers permitted for username & password
|
||||||
SAMBA_USERNAME=`echo $SAMBA_USERNAME | sed "s/[^a-zA-Z0-9]//g;"`
|
SAMBA_USERNAME=`echo $SAMBA_USERNAME | sed "s/[^a-zA-Z0-9]//g;"`
|
||||||
SAMBA_PASSWORD=`echo $SAMBA_PASSWORD | sed "s/[^a-zA-Z0-9]//g;"`
|
SAMBA_PASSWORD=`echo $SAMBA_PASSWORD | sed "s/[^a-zA-Z0-9]//g;"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user