From e43401d02bea133e90620da521fd1a8180e82d97 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 7 Jan 2011 10:18:19 -0500 Subject: Stop avahi from pulling the wrong binary for 2.0 --- config/avahi/avahi.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc index 8249d33a..6d132bcc 100644 --- a/config/avahi/avahi.inc +++ b/config/avahi/avahi.inc @@ -43,10 +43,12 @@ function avahi_install() { 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"; + // Extract out libraries and avahi-daemon - if(file_exists("/root/avahi.tar.gz")) { - exec("/usr/bin/tar xzPUf /root/avahi.tar.gz -C /"); - unlink("/root/avahi.tar.gz"); + if(file_exists("/root/{$archive}")) { + exec("/usr/bin/tar xzPUf /root/{$archive} -C /"); + unlink("/root/{$archive}"); } // Make sure everthing was extracted -- cgit v1.2.3