Ticket #1796: avahi Webinterface.diff

Datei avahi Webinterface.diff, 13.4 KB (hinzugefügt von cyberlight, vor 6 Jahren)
  • avahi.mk

     
    1 $(call PKG_INIT_BIN, 0.6.30) 
     1$(call PKG_INIT_BIN, 0.6.31) 
    22$(PKG)_SOURCE:=avahi-$($(PKG)_VERSION).tar.gz 
    3 $(PKG)_SOURCE_MD5:=e4db89a2a403ff4c47d66ac66fad1f43 
     3$(PKG)_SOURCE_MD5:=2f22745b8f7368ad5a0a3fddac343f2d 
    44$(PKG)_SITE:=http://avahi.org/download 
    55 
    66$(PKG)_BINARIES := avahi-daemon $(if $(FREETZ_PACKAGE_AVAHI_WITH_DNSCONFD),avahi-dnsconfd) 
     
    5252$(PKG)_CONFIGURE_OPTIONS += --with-avahi-group=nobody 
    5353$(PKG)_CONFIGURE_OPTIONS += --with-autoipd-user=nobody 
    5454$(PKG)_CONFIGURE_OPTIONS += --with-autoipd-group=nobody 
     55$(PKG)_CONFIGURE_OPTIONS += --sysconfdir="/mod/etc" 
    5556 
    5657$(PKG_SOURCE_DOWNLOAD) 
    5758$(PKG_UNPACKED) 
  • files/.language

     
     1languages 
     2{ de en } 
     3default 
     4{ en } 
     5files 
     6{ 
     7    etc/default.avahi/avahi-daemon_conf.def 
     8    etc/default.avahi/avahi_hosts.def 
     9    etc/default.avahi/avahi_service.def 
     10    etc/init.d/rc.avahi 
     11    usr/lib/cgi-bin/avahi.cgi 
     12} 
  • files/root/usr/lib/cgi-bin/avahi.cgi

     
     1#!/bin/sh 
     2 
     3PATH=/bin:/usr/bin:/sbin:/usr/sbin 
     4. /usr/lib/libmodcgi.sh 
     5 
     6check "$AVAHI_ENABLED" yes:auto "*":man 
     7 
     8sec_begin '$(lang de:"Starttyp" en:"Start type")' 
     9 
     10cat << EOF 
     11<p> 
     12<input id='e1' type='radio' name='enabled' value='yes'$auto_chk><label for='e1'>$(lang de:"Automatisch" en:"Automatic")</label> 
     13<input id='e2' type='radio' name='enabled' value='no'$man_chk><label for='e2'>$(lang de:"Manuell" en:"Manual")</label> 
     14</p> 
     15EOF 
     16 
     17sec_end 
     18sec_begin '$(lang de:"Einstellungen" en:"Settings")' 
     19 
     20cat << EOF 
     21<ul> 
     22<li><a href='$(href file avahi avahi-daemon_conf)'>$(lang de:"Hauptkonfigurationsdatei" en:"Main config file") (avahi-daemon_conf)</a></li> 
     23<li><a href='$(href file avahi avahi_hosts)'>$(lang de:"Statische Hosts" en:"Static hosts") (avahi_hosts)</a></li> 
     24<li><a href='$(href file avahi avahi_service)'>$(lang de:"Statische Dienste" en:"Static services") (avahi_service)</a></li> 
     25</ul> 
     26EOF 
     27 
     28sec_end 
  • files/root/etc/init.d/rc.avahi

    Eigenschaftsänderungen: files/root/usr/lib/cgi-bin/avahi.cgi
    ___________________________________________________________________
    Hinzugefügt: svn:executable
       + *
    
     
    22 
    33DAEMON=avahi 
    44DAEMON_BIN=avahi-daemon 
     5DAEMON_LONG_NAME=Avahi-daemon 
     6DAEMON_CONFIG=/mod/etc/avahi/avahi-daemon_conf 
    57 
    68. /etc/init.d/modlibrc 
    79 
     
    911DAEMON_GROUP=nobody 
    1012 
    1113start() { 
    12     modlib_startdaemon $DAEMON_BIN -D 
     14    modlib_startdaemon $DAEMON_BIN \ 
     15      -f $DAEMON_CONFIG \ 
     16      -D 
    1317} 
    1418 
     19config() { 
     20     mkdir -p /mod/etc/avahi 
     21     /mod/etc/default.avahi/avahi-daemon_conf_conf > /mod/etc/avahi/avahi-daemon_conf 
     22     /mod/etc/default.avahi/avahi_service_conf > /mod/etc/avahi/avahi_service 
     23     /mod/etc/default.avahi/avahi_hosts_conf > /mod/etc/avahi/avahi_hosts 
     24     ln -sf avahi-daemon_conf /mod/etc/avahi/avahi-daemon.conf 
     25     ln -sf avahi_service /mod/etc/avahi/avahi.service 
     26     ln -sf avahi_hosts /mod/etc/avahi/avahi.hosts 
     27     mkdir -p /mod/etc/avahi/services 
     28     ln -sf ../avahi_service /mod/etc/avahi/services/avahi.service 
     29     ln -sf avahi-daemon /mod/etc/avahi 
     30} 
     31 
    1532case $1 in 
    16     load) 
    17         modreg daemon $DAEMON 
    18         if [ ! -d /tmp/flash/avahi ]; then 
    19             mkdir -p /tmp/flash/avahi 
    20             cp -a /etc/default.avahi/* /tmp/flash/avahi/ 
     33    ""|load) 
     34        modlib_addgroup nobody 
     35        modlib_adduser nobody -s /bin/false -D -S -H -G nobody -g 'nobody' 
     36         
     37        mkdir -p "/tmp/flash/${DAEMON}" 
     38        mkdir -p "/var/run" 
     39 
     40        modreg cgi avahi "Avahi" 
     41        modreg daemon avahi 
     42        modreg file avahi avahi-daemon_conf '$(lang de:"Hauptkonfigurationsdatei" en:"Main config file")' 1 "avahi-daemon_conf" 
     43        modreg file avahi avahi_service '$(lang de:"Statische Dienste" en:"Static services")' 1 "avahi_service" 
     44        modreg file avahi avahi_hosts '$(lang de:"Statische Hosts" en:"Static hosts")' 1 "avahi_hosts" 
     45 
     46        if [ ! -e /var/mod/etc/init.d/rc.$DAEMON_BIN ]; then 
     47            ln -s /etc/init.d/rc.$DAEMON_BIN /var/mod/etc/init.d/rc.$DAEMON_BIN 
    2148        fi 
    22          
    23         modlib_start $AVAHI_ENABLED  
     49 
     50        modlib_start $AVAHI_DAEMON_ENABLED 
    2451        ;; 
     52    unload) 
     53        modunreg file avahi 
     54        modunreg daemon $DAEMON 
     55        modunreg cgi avahi 
     56        modlib_stop 
     57        ;; 
    2558    start) 
     59        config 
    2660        start 
    2761        ;; 
    2862    stop) 
    29         modlib_stop 
     63                echo -n "Stopping ${DAEMON} ... " 
     64        killall ${DAEMON} >/dev/null 2>/dev/null 
     65        echo "done" 
    3066        ;; 
    3167    restart) 
     68        config 
     69        modlib_check_running 
    3270        modlib_restart 
    3371        ;; 
    3472    status) 
    3573        modlib_status 
    3674        ;; 
     75    config) 
     76        config 
     77        ;; 
    3778    *) 
    38         echo "Usage: $0 [start|stop|restart|load|status]" 1>&2 
     79        echo "Usage: $0 [load|unload|start|stop|restart|status|config]" 1>&2 
    3980        exit 1 
    40                 ;; 
     81        ;; 
    4182esac 
    4283 
    4384exit 0 
  • files/root/etc/avahi

     
    1 link /tmp/flash/avahi 
    2  No newline at end of file 
  • files/root/etc/default.avahi/avahi-daemon.conf

     
    1 # This file is part of avahi. 
    2 # 
    3 # avahi is free software; you can redistribute it and/or modify it 
    4 # under the terms of the GNU Lesser General Public License as 
    5 # published by the Free Software Foundation; either version 2 of the 
    6 # License, or (at your option) any later version. 
    7 # 
    8 # avahi is distributed in the hope that it will be useful, but WITHOUT 
    9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
    10 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
    11 # License for more details. 
    12 # 
    13 # You should have received a copy of the GNU Lesser General Public 
    14 # License along with avahi; if not, write to the Free Software 
    15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 
    16 # USA. 
    17  
    18 # See avahi-daemon.conf(5) for more information on this configuration 
    19 # file! 
    20  
    21 [server] 
    22 #host-name=foo 
    23 #domain-name=local 
    24 #browse-domains=0pointer.de, zeroconf.org 
    25 use-ipv4=yes 
    26 use-ipv6=no 
    27 #allow-interfaces=eth0 
    28 #deny-interfaces=eth1 
    29 #check-response-ttl=no 
    30 #use-iff-running=no 
    31 #enable-dbus=yes 
    32 #disallow-other-stacks=no 
    33 #allow-point-to-point=no 
    34 #cache-entries-max=4096 
    35 #clients-max=4096 
    36 #objects-per-client-max=1024 
    37 #entries-per-entry-group-max=32 
    38 ratelimit-interval-usec=1000000 
    39 ratelimit-burst=1000 
    40  
    41 [wide-area] 
    42 enable-wide-area=yes 
    43  
    44 [publish] 
    45 #disable-publishing=no 
    46 #disable-user-service-publishing=no 
    47 #add-service-cookie=no 
    48 #publish-addresses=yes 
    49 #publish-hinfo=yes 
    50 #publish-workstation=yes 
    51 #publish-domain=yes 
    52 #publish-dns-servers=192.168.50.1, 192.168.50.2 
    53 #publish-resolv-conf-dns-servers=yes 
    54 #publish-aaaa-on-ipv4=yes 
    55 #publish-a-on-ipv6=no 
    56  
    57 [reflector] 
    58 #enable-reflector=no 
    59 #reflect-ipv=no 
    60  
    61 [rlimits] 
    62 #rlimit-as= 
    63 rlimit-core=0 
    64 rlimit-data=4194304 
    65 rlimit-fsize=0 
    66 rlimit-nofile=768 
    67 rlimit-stack=4194304 
    68 rlimit-nproc=3 
  • files/root/etc/default.avahi/avahi_hosts_conf

     
     1#!/bin/sh 
     2 
     3CFGFILE="/tmp/flash/avahi/avahi_hosts" 
     4 
     5if [ ! -f $CFGFILE ] 
     6then cat << EOF 
     7EOF 
     8else cat $CFGFILE; 
     9fi 
  • files/root/etc/default.avahi/avahi_service_conf

    Eigenschaftsänderungen: files/root/etc/default.avahi/avahi_hosts_conf
    ___________________________________________________________________
    Hinzugefügt: svn:executable
       + *
    
     
     1#!/bin/sh 
     2 
     3CFGFILE="/tmp/flash/avahi/avahi_service" 
     4 
     5if [ ! -f $CFGFILE ] 
     6then cat << EOF 
     7<?xml version="1.0" standalone='no'?><!--*-nxml-*--> 
     8<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> 
     9 
     10<service-group> 
     11 
     12<name replace-wildcards="yes">%h</name> 
     13 
     14<service> 
     15<type>_afpovertcp._tcp</type> 
     16<port>548</port> 
     17</service> 
     18 
     19</service-group> 
     20EOF 
     21else cat $CFGFILE; 
     22fi 
  • files/root/etc/default.avahi/hosts

    Eigenschaftsänderungen: files/root/etc/default.avahi/avahi_service_conf
    ___________________________________________________________________
    Hinzugefügt: svn:executable
       + *
    
     
    1 # This file is part of avahi. 
    2 #  
    3 # avahi is free software; you can redistribute it and/or modify it 
    4 # under the terms of the GNU Lesser General Public License as 
    5 # published by the Free Software Foundation; either version 2 of the 
    6 # License, or (at your option) any later version. 
    7 # 
    8 # avahi is distributed in the hope that it will be useful, but WITHOUT 
    9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
    10 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
    11 # License for more details. 
    12 # 
    13 # You should have received a copy of the GNU Lesser General Public 
    14 # License along with avahi; if not, write to the Free Software 
    15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 
    16 # USA. 
    17  
    18 # This file contains static ip address <-> host name mappings.  These 
    19 # can be useful to publish services on behalf of a non-avahi enabled 
    20 # device. Please bear in mind that host names are expected to be 
    21 # fully qualified domain names, i.e. ending in .local! 
    22  
    23 # See avahi.hosts(5) for more information on this configuration file! 
    24  
    25 # Examples: 
    26 # 192.168.0.1 router.local 
    27 # 2001::81:1 test.local 
  • files/root/etc/default.avahi/avahi-daemon_conf_conf

     
     1#!/bin/sh 
     2 
     3CFGFILE="/tmp/flash/avahi/avahi-daemon_conf" 
     4 
     5if [ ! -f $CFGFILE ] 
     6then cat << EOF 
     7[server] 
     8host-name=Fritzbox 
     9#domain-name=box 
     10browse-domains=jens-david-consulting.com, jens-david-consulting.de 
     11use-ipv4=yes 
     12use-ipv6=no 
     13disallow-other-stacks=no 
     14allow-point-to-point=no 
     15 
     16[wide-area] 
     17enable-wide-area=yes 
     18 
     19[publish] 
     20disable-publishing=no 
     21disable-user-service-publishing=no 
     22publish-domain=yes 
     23#publish-dns-servers=192.168.50.1, 192.168.50.2 
     24#publish-resolv-conf-dns-servers=yes 
     25 
     26[reflector] 
     27#enable-reflector=no 
     28#reflect-ipv=no 
     29 
     30[rlimits] 
     31#rlimit-as= 
     32rlimit-core=0 
     33rlimit-data=1000000 
     34rlimit-nofile=60 
     35rlimit-stack=1000000 
     36rlimit-nproc=5 
     37EOF 
     38else cat $CFGFILE; 
     39fi 
  • files/root/etc/default.avahi/avahi_hosts.def

    Eigenschaftsänderungen: files/root/etc/default.avahi/avahi-daemon_conf_conf
    ___________________________________________________________________
    Hinzugefügt: svn:executable
       + *
    
     
     1CAPTION='Avahi-daemon: Static hosts file' 
     2DESCRIPTION='<a href="http://avahi.org/download/avahi.hosts.5.xml" target="_blank">Syntax see documentation of avahi_hosts</a><br>' 
     3 
     4CONFIG_FILE='/tmp/flash/avahi/avahi_hosts' 
     5CONFIG_SAVE='modsave flash; if pidof avahi-daemon > /dev/null; then echo ""; /mod/etc/init.d/rc.avahi restart; fi' 
     6CONFIG_TYPE='text' 
     7 
     8TEXT_ROWS=20 
  • files/root/etc/default.avahi/avahi_service.def

     
     1CAPTION='Avahi-daemon: Static service definitions file' 
     2DESCRIPTION='<a href="http://avahi.org/download/avahi.service.5.xml" target="_blank">Syntax see documentation of avahi_service</a><br>' 
     3 
     4CONFIG_FILE='/tmp/flash/avahi/avahi_service' 
     5CONFIG_SAVE='modsave flash; if pidof avahi-daemon > /dev/null; then echo ""; /mod/etc/init.d/rc.avahi restart; fi' 
     6CONFIG_TYPE='text' 
     7 
     8TEXT_ROWS=40 
  • files/root/etc/default.avahi/avahi-daemon_conf.def

     
     1CAPTION='Avahi-daemon: Main config file' 
     2DESCRIPTION='<a href="http://avahi.org/download/avahi-daemon.conf.5.xml" target="_blank">Syntax see documentation of avahi-daemon_conf</a><br>' 
     3 
     4CONFIG_FILE='/tmp/flash/avahi/avahi-daemon_conf' 
     5CONFIG_SAVE='modsave flash; if pidof avahi-daemon > /dev/null; then echo ""; /mod/etc/init.d/rc.avahi restart; fi' 
     6CONFIG_TYPE='text' 
     7 
     8TEXT_ROWS=20 
  • Config.in

     
    11config FREETZ_PACKAGE_AVAHI 
    2     bool "Avahi 0.6.30" 
     2    bool "Avahi 0.6.31" 
    33    select FREETZ_LIB_libdl 
    44    select FREETZ_LIB_libpthread 
    55    select FREETZ_LIB_libexpat