mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
Merge pull request #1928 from MilhouseVH/le82_settings_workgroup_minmax
LibreELEC-settings: add support for workgroup, server min/max proto s…
This commit is contained in:
commit
d252e341ed
@ -17,7 +17,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="LibreELEC-settings"
|
PKG_NAME="LibreELEC-settings"
|
||||||
PKG_VERSION="4f81a2d"
|
PKG_VERSION="2ef3940"
|
||||||
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