aboutsummaryrefslogtreecommitdiffstats
path: root/config/avahi
diff options
context:
space:
mode:
Diffstat (limited to 'config/avahi')
-rw-r--r--config/avahi/avahi.inc41
-rw-r--r--config/avahi/avahi.xml6
2 files changed, 21 insertions, 26 deletions
diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc
index 7b093276..554a647c 100644
--- a/config/avahi/avahi.inc
+++ b/config/avahi/avahi.inc
@@ -33,7 +33,7 @@ $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
switch ($pfs_version) {
case "1.2":
case "2.0":
- define('AVAHI_BASE','/usr/local');
+ define('AVAHI_BASE', '/usr/local');
break;
default:
define('AVAHI_BASE', '/usr/pbi/avahi-' . php_uname("m"));
@@ -51,20 +51,8 @@ function avahi_install() {
global $g, $config;
conf_mount_rw();
- // This old hacky install code should only happen on 1.x
- if (php_uname("m") == "i386")
- $archive = (substr(trim(file_get_contents("/etc/version")),0,1) == "1") ? "avahi.tar.gz" : "";
- // Extract out libraries and avahi-daemon
- if(!empty($archive) && file_exists("/root/{$archive}")) {
- exec("mkdir -p " . AVAHI_BASE . "/etc/avahi/services/");
- exec("mv " . AVAHI_BASE . "/etc/avahi/*.service " . AVAHI_BASE . "/etc/avahi/services/");
- exec("/usr/bin/tar xzPUf /root/{$archive} -C /");
- unlink("/root/{$archive}");
- // Make sure everthing was extracted
- if(!file_exists(AVAHI_BASE . "/sbin/avahi-daemon")) {
- log_error("Sorry, something went wrong while extract avahi binaries. Please try the operation again");
- return;
- }
+ if (!file_exists('/usr/local/etc/gnome.subr')) {
+ @symlink(AVAHI_BASE . '/etc/gnome.subr', '/usr/local/etc/gnome.subr');
}
// Add needed users and groups
@@ -115,12 +103,12 @@ function avahi_write_config() {
[server]
host-name={$hostname}
-domain-name={$domain}
-browse-domains="{$browsedomains}"
+domain-name=local
+browse-domains={$browsedomains}
deny-interfaces={$denyinterfaces}
use-ipv4={$useipv4}
use-ipv6={$useipv6}
-enable-dbus=no
+enable-dbus=yes
#check-response-ttl=no
#use-iff-running=no
#disallow-other-stacks=no
@@ -168,20 +156,27 @@ EOF;
$start .= " mkdir -p /proc\n";
$start .= " mount -t procfs procfs /proc\n";
$start .= "fi\n";
- $start .= "/usr/bin/killall avahi-daemon\n";
+ $start .= "if [ ! -f /usr/local/etc/gnome.subr ]; then\n";
+ $start .= " ln -sf " . AVAHI_BASE . "/etc/gnome.subr /usr/local/etc/gnome.subr\n";
+ $start .= "fi\n";
+ $start .= "if [ ! -d /var/run/dbus ]; then\n";
+ $start .= " mkdir /var/run/dbus\n";
+ $start .= " chown messagebus:messagebus /var/run/dbus\n";
+ $start .= "fi\n";
+ $start .= "/usr/bin/killall avahi-daemon >/dev/null 2>&1\n";
if (file_exists(AVAHI_BASE . "/etc/rc.d/dbus")) {
- $start .= "/usr/bin/killall dbus-daemon\n";
- $start .= "rm /var/run/dbus/dbus.pid\n";
+ $start .= AVAHI_BASE . "/etc/rc.d/dbus onestop\n";
+ $start .= "rm /var/run/dbus/dbus.pid >/dev/null 2>&1\n";
$start .= AVAHI_BASE . "/etc/rc.d/dbus onestart\n";
}
$start .= "sleep 5\n";
$start .= AVAHI_BASE . "/sbin/avahi-daemon -D\n";
$start .= "/etc/rc.conf_mount_ro\n";
- $stop = "/usr/bin/killall avahi-daemon\n";
+ $stop = "/usr/bin/killall avahi-daemon >/dev/null 2>&1\n";
if (file_exists(AVAHI_BASE . "/etc/rc.d/dbus")) {
$stop .= AVAHI_BASE . "/etc/rc.d/dbus onestop\n";
- $stop .= "rm /var/run/dbus/dbus.pid\n";
+ $stop .= "rm /var/run/dbus/dbus.pid >/dev/null 2>&1\n";
}
write_rcfile(array(
diff --git a/config/avahi/avahi.xml b/config/avahi/avahi.xml
index d1e58bdc..f3f98dd4 100644
--- a/config/avahi/avahi.xml
+++ b/config/avahi/avahi.xml
@@ -34,7 +34,7 @@
</copyright>
<title>Services: Avahi</title>
<name>avahi</name>
- <version>0.6.29 pkg v1.01</version>
+ <version>0.6.31 pkg v1.05</version>
<savetext>Save</savetext>
<include_file>/usr/local/pkg/avahi.inc</include_file>
<menu>
@@ -59,13 +59,13 @@
<field>
<fielddescr>Browse domains (comma separated)</fielddescr>
<fieldname>browsedomains</fieldname>
- <description>Enter the domains that you would like proxied. (example: .local, pfsense.org, mydomain.com)</description>
+ <description>Enter the domains that you would like proxied. (example: local, pfsense.org, mydomain.com)</description>
<type>input</type>
</field>
<field>
<fielddescr>Deny interfaces</fielddescr>
<fieldname>denyinterfaces</fieldname>
- <description>Interfaces that you do NOT want Avahi to listen on. NOTE: WAN is disabled by default.</description>
+ <description>Interfaces that you do NOT want Avahi to listen on. NOTE: WAN is always disabled.</description>
<type>interfaces_selection</type>
<multiple>true</multiple>
</field>