aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-04-05 13:05:12 -0400
committerjim-p <jimp@pfsense.org>2011-04-05 13:06:18 -0400
commitce05f4d9a001368f87871ba8f32ae1e26979efdd (patch)
tree378ebdef0a53b5a7d8e03f064762acf9311bf960
parentae8adcb859fc78e94ef9e21dbb149f3cb6985065 (diff)
downloadpfsense-packages-ce05f4d9a001368f87871ba8f32ae1e26979efdd.tar.gz
pfsense-packages-ce05f4d9a001368f87871ba8f32ae1e26979efdd.tar.bz2
pfsense-packages-ce05f4d9a001368f87871ba8f32ae1e26979efdd.zip
Don't unpack the avahi tgz on amd64, since it contains only i386 binaries. Instead, try to install the package the normal way.
-rw-r--r--config/avahi/avahi.inc20
-rwxr-xr-xpkg_config.8.xml.amd641
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>