diff options
-rw-r--r-- | config/avahi/avahi.inc | 20 | ||||
-rwxr-xr-x | pkg_config.8.xml.amd64 | 1 |
2 files changed, 11 insertions, 10 deletions
diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc index 6d132bcc..b5febefe 100644 --- a/config/avahi/avahi.inc +++ b/config/avahi/avahi.inc @@ -40,21 +40,21 @@ function avahi_stop() { function avahi_install() { global $g, $config; conf_mount_rw(); - exec("mkdir -p /usr/local/etc/avahi/services/"); - exec("mv /usr/local/etc/avahi/*.service /usr/local/etc/avahi/services/"); - $archive = (substr(trim(file_get_contents("/etc/version")),0,1) == "2") ? "avahi8.tar.gz" : "avahi.tar.gz"; + if (php_uname("m") == "i386") + $archive = (substr(trim(file_get_contents("/etc/version")),0,1) == "2") ? "avahi8.tar.gz" : "avahi.tar.gz"; // Extract out libraries and avahi-daemon - if(file_exists("/root/{$archive}")) { + if(!empty($archive) && file_exists("/root/{$archive}")) { + exec("mkdir -p /usr/local/etc/avahi/services/"); + exec("mv /usr/local/etc/avahi/*.service /usr/local/etc/avahi/services/"); exec("/usr/bin/tar xzPUf /root/{$archive} -C /"); unlink("/root/{$archive}"); - } - - // Make sure everthing was extracted - if(!file_exists("/usr/local/sbin/avahi-daemon")) { - log_error("Sorry, something went wrong while extract avahi binaries. Please try the operation again"); - return; + // Make sure everthing was extracted + if(!file_exists("/usr/local/sbin/avahi-daemon")) { + log_error("Sorry, something went wrong while extract avahi binaries. Please try the operation again"); + return; + } } // Add needed users and groups diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 7694b4a8..7ce9f874 100755 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -192,6 +192,7 @@ <depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url> <build_port_path>/usr/ports/net/avahi</build_port_path> <build_port_path>/usr/ports/net/avahi-app</build_port_path> + <depends_on_package>avahi-0.6.28.tbz</depends_on_package> <version>0.6.25_1</version> <status>ALPHA</status> <required_version>1.2.3</required_version> |