diff options
author | jim-p <jimp@pfsense.org> | 2011-01-07 10:18:19 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-01-07 10:18:19 -0500 |
commit | e43401d02bea133e90620da521fd1a8180e82d97 (patch) | |
tree | 368d5f6fbf2d6dc837d2a74fbf9e4d1331bf9d88 | |
parent | d09f3e6fbeeabe317639b39ca2f372d04336f22a (diff) | |
download | pfsense-packages-e43401d02bea133e90620da521fd1a8180e82d97.tar.gz pfsense-packages-e43401d02bea133e90620da521fd1a8180e82d97.tar.bz2 pfsense-packages-e43401d02bea133e90620da521fd1a8180e82d97.zip |
Stop avahi from pulling the wrong binary for 2.0
-rw-r--r-- | config/avahi/avahi.inc | 8 |
1 files changed, 5 insertions, 3 deletions
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 |