aboutsummaryrefslogtreecommitdiffstats
path: root/config/avahi/avahi.inc
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 /config/avahi/avahi.inc
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.
Diffstat (limited to 'config/avahi/avahi.inc')
-rw-r--r--config/avahi/avahi.inc20
1 files changed, 10 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