aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-11-26 16:55:25 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-11-26 16:55:25 -0200
commit29a90785f8d906760c9f959b7efe5d107c0b37e1 (patch)
treed4843a8ed3ff14e6b30fb7b39f73aee4a857fb53 /config
parentd34a474a6ca40be79b5ea0a97db2b55c1ea709cc (diff)
downloadpfsense-packages-29a90785f8d906760c9f959b7efe5d107c0b37e1.tar.gz
pfsense-packages-29a90785f8d906760c9f959b7efe5d107c0b37e1.tar.bz2
pfsense-packages-29a90785f8d906760c9f959b7efe5d107c0b37e1.zip
Remove old hack from 1.x times, also make sure gnome.subr is available, otherwise dbus won't work
Diffstat (limited to 'config')
-rw-r--r--config/avahi/avahi.inc23
1 files changed, 5 insertions, 18 deletions
diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc
index ecef6f33..58d3ade4 100644
--- a/config/avahi/avahi.inc
+++ b/config/avahi/avahi.inc
@@ -48,26 +48,10 @@ function avahi_stop() {
}
function avahi_install() {
- global $g, $config, $pfs_version;
+ 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 ($pfs_version >= 2.2 && !file_exists('/usr/local/etc/gnome.subr')) {
+ if (!file_exists('/usr/local/etc/gnome.subr')) {
@symlink(AVAHI_BASE . '/etc/gnome.subr', '/usr/local/etc/gnome.subr');
}
@@ -172,6 +156,9 @@ EOF;
$start .= " mkdir -p /proc\n";
$start .= " mount -t procfs procfs /proc\n";
$start .= "fi\n";
+ $start .= "if [ ! -f /usr/local/etc/gnome.subr ]; then\n";
+ $start .= " ln -sf " . AVAHI_BASE . "/etc/gnome.subr /usr/local/etc/gnome.subr";
+ $start .= "fi\n";
$start .= "/usr/bin/killall avahi-daemon >/dev/null 2>&1\n";
if (file_exists(AVAHI_BASE . "/etc/rc.d/dbus")) {
$start .= AVAHI_BASE . "/etc/rc.d/dbus onestop\n";