mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
avahi/samba: When samba is built with avahi support the server name is advertised in UPPERCASE as samba forces this when setting-up avahi via dbus. If we disable avahi support in samba and include a samba.service file with avahi the hostname is correctly advertised as the user entered it; e.g. OpenELEC not OPENELEC ..we can also use a tweaked samba.service so Mac users with an AppleTV see the AppleTV icon in Finder.app instead of a generic server icon. this fixes #2282
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
110922d392
commit
d314594b60
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
||||||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
||||||
<service-group>
|
<service-group>
|
||||||
<name replace-wildcards="yes">Web Server on %h</name>
|
<name replace-wildcards="yes">%h</name>
|
||||||
<service>
|
<service>
|
||||||
<type>_http._tcp</type>
|
<type>_http._tcp</type>
|
||||||
<port>80</port>
|
<port>80</port>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
||||||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
||||||
<service-group>
|
<service-group>
|
||||||
<name replace-wildcards="yes">Samba Server on %h</name>
|
<name replace-wildcards="yes">%h</name>
|
||||||
<service>
|
<service>
|
||||||
<type>_smb._tcp</type>
|
<type>_smb._tcp</type>
|
||||||
<port>139</port>
|
<port>445</port>
|
||||||
</service>
|
</service>
|
||||||
</service-group>
|
</service-group>
|
||||||
|
@ -39,7 +39,14 @@ mkdir -p $INSTALL/etc/avahi
|
|||||||
mkdir -p $INSTALL/etc/avahi/services
|
mkdir -p $INSTALL/etc/avahi/services
|
||||||
cp $PKG_BUILD/avahi-daemon/ssh.service $INSTALL/etc/avahi/services
|
cp $PKG_BUILD/avahi-daemon/ssh.service $INSTALL/etc/avahi/services
|
||||||
cp $PKG_DIR/config/http.service $INSTALL/etc/avahi/services
|
cp $PKG_DIR/config/http.service $INSTALL/etc/avahi/services
|
||||||
# cp $PKG_DIR/config/samba.service $INSTALL/etc/avahi/services
|
|
||||||
|
if [ $SAMBA_SERVER = "yes" ]; then
|
||||||
|
if [ -f $PROJECT_DIR/$PROJECT/avahi/samba.service ]; then
|
||||||
|
cp $PROJECT_DIR/$PROJECT/avahi/samba.service $INSTALL/etc/avahi/services
|
||||||
|
else
|
||||||
|
cp $PKG_DIR/config/samba.service $INSTALL/etc/avahi/services
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $SFTP_SERVER = "yes" ]; then
|
if [ $SFTP_SERVER = "yes" ]; then
|
||||||
cp $PKG_BUILD/avahi-daemon/sftp-ssh.service $INSTALL/etc/avahi/services
|
cp $PKG_BUILD/avahi-daemon/sftp-ssh.service $INSTALL/etc/avahi/services
|
||||||
|
@ -22,12 +22,6 @@
|
|||||||
|
|
||||||
. config/options $1
|
. config/options $1
|
||||||
|
|
||||||
if [ "$AVAHI_DAEMON" = yes ]; then
|
|
||||||
SMB_AVAHI="--enable-avahi"
|
|
||||||
else
|
|
||||||
SMB_AVAHI="--disable-avahi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -fPIC -DPIC"
|
CFLAGS="$CFLAGS -fPIC -DPIC"
|
||||||
|
|
||||||
cd $PKG_BUILD/source3
|
cd $PKG_BUILD/source3
|
||||||
@ -79,7 +73,7 @@ samba_cv_have_setresuid=yes \
|
|||||||
--disable-relro \
|
--disable-relro \
|
||||||
--disable-fam \
|
--disable-fam \
|
||||||
--disable-dnssd \
|
--disable-dnssd \
|
||||||
$SMB_AVAHI \
|
--disable-avahi \
|
||||||
--disable-pthreadpool \
|
--disable-pthreadpool \
|
||||||
--enable-gnutls \
|
--enable-gnutls \
|
||||||
--disable-netapi \
|
--disable-netapi \
|
||||||
|
@ -34,8 +34,3 @@ PKG_LONGDESC="Samba is a SMB server that runs on Unix and other operating system
|
|||||||
PKG_IS_ADDON="no"
|
PKG_IS_ADDON="no"
|
||||||
|
|
||||||
PKG_AUTORECONF="no"
|
PKG_AUTORECONF="no"
|
||||||
|
|
||||||
if [ "$AVAHI_DAEMON" = yes ]; then
|
|
||||||
PKG_DEPENDS="$PKG_DEPENDS avahi"
|
|
||||||
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS avahi"
|
|
||||||
fi
|
|
||||||
|
14
projects/ATV/avahi/samba.service
Normal file
14
projects/ATV/avahi/samba.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
||||||
|
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
||||||
|
<service-group>
|
||||||
|
<name replace-wildcards="yes">%h</name>
|
||||||
|
<service>
|
||||||
|
<type>_smb._tcp</type>
|
||||||
|
<port>445</port>
|
||||||
|
</service>
|
||||||
|
<service>
|
||||||
|
<type>_device-info._tcp</type>
|
||||||
|
<port>0</port>
|
||||||
|
<txt-record>model=AppleTV1,1</txt-record>
|
||||||
|
</service>
|
||||||
|
</service-group>
|
Loading…
x
Reference in New Issue
Block a user