diff options
author | jim-p <jim@pingle.org> | 2009-09-26 00:08:52 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2009-09-26 00:14:42 -0400 |
commit | c08db1d0285bb5dfcd5a2665af8d228f4d9d0d05 (patch) | |
tree | 8efad7648f10c159c023a70496bc3ed129c83655 /config | |
parent | e4e73d20753aea539c9ac3ebf7429c6ea64a5963 (diff) | |
download | pfsense-packages-c08db1d0285bb5dfcd5a2665af8d228f4d9d0d05.tar.gz pfsense-packages-c08db1d0285bb5dfcd5a2665af8d228f4d9d0d05.tar.bz2 pfsense-packages-c08db1d0285bb5dfcd5a2665af8d228f4d9d0d05.zip |
Slight changes to Avahi package, hopefully fixes install errors on nano
Diffstat (limited to 'config')
-rw-r--r-- | config/avahi/avahi.inc | 19 | ||||
-rw-r--r-- | config/avahi/avahi.xml | 3 |
2 files changed, 10 insertions, 12 deletions
diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc index e82e7db3..2c1ce25f 100644 --- a/config/avahi/avahi.inc +++ b/config/avahi/avahi.inc @@ -1,6 +1,6 @@ <?php -/* +/* $Id$ avahi.inc part of pfSense (http://www.pfSense.com) @@ -40,18 +40,21 @@ function stop_avahi() { function setup_avahi() { global $g, $config; + // Make image RW + conf_mount_rw(); + // Extract out libraries and avahi-daemon if(file_exists("/tmp/avahi.tgz")) { exec("/usr/bin/tar xzPf /tmp/avahi.tgz -C /"); unlink("/tmp/avahi.tgz"); } - + // 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; } - + // Pull some various values out of config.xml $hostname = $config['system']['hostname']; $domain = $config['system']['domain']; @@ -60,14 +63,14 @@ function setup_avahi() { $denyif = $config['installedpackages']['avahi']['config'][0]['denyinterfaces']; // Is package disabled? - if(!$enable) { + if ((!$enable) && file_exists("/usr/local/etc/rc.d/avahi-daemon.sh")) { stop_avahi(); return; } // Add needed users and groups exec("/usr/sbin/pw useradd avahi"); - exec("/usr/sbin/pw groupadd avahi"); + exec("/usr/sbin/pw groupadd avahi"); // No supplied domains? Use the defaults. if(!$browsedomains) @@ -90,7 +93,7 @@ function setup_avahi() { $avahiconfig = <<<EOF # avahi.conf - This file was automatically generated by the pfSense pacakge -# manager. Do not edit this file, it will be overwritten automatically. +# manager. Do not edit this file, it will be overwritten automatically. # See /usr/local/pkg/avahi.inc to make changes to this file! [server] @@ -137,8 +140,6 @@ rlimit-nproc=3 EOF; - // Make image RW - conf_mount_rw(); /* Write out .conf file */ safe_mkdir("/usr/local/etc/avahi"); $fd = fopen("/usr/local/etc/avahi/avahi-daemon.conf", "w"); @@ -151,7 +152,7 @@ EOF; $start .= " mount -t procfs procfs /proc\n"; $start .= "fi\n"; $start .= "/usr/local/sbin/avahi-daemon -D\n"; - $start .= "/etc/rc.conf_mount_ro\n"; + $start .= "/etc/rc.conf_mount_ro\n"; $stop = "/usr/bin/killall avahi-daemon"; write_rcfile(array( "file" => "avahi-daemon.sh", diff --git a/config/avahi/avahi.xml b/config/avahi/avahi.xml index 3670e7d6..21d60576 100644 --- a/config/avahi/avahi.xml +++ b/config/avahi/avahi.xml @@ -86,9 +86,6 @@ <multiple>true</multiple> </field> </fields> - <custom_add_php_command> - setup_avahi(); - </custom_add_php_command> <custom_php_install_command> exec("mkdir -p /usr/local/etc/avahi/services/"); exec("mv /usr/local/etc/avahi/*.service /usr/local/etc/avahi/services/"); |