aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-12-09 08:24:53 -0500
committerjim-p <jimp@pfsense.org>2015-12-09 08:24:53 -0500
commit476e554303d9adc030f6e107a164c0a5ad1dfc0c (patch)
tree35bf7ba9f39f9ccad9bf655b215330863636fd95
parent61bdaef169d51066c4730e230d98d308da5fbaf6 (diff)
parent29ed4e8e0067a3e1d2281eaa7fbef6d84f27e694 (diff)
downloadpfsense-packages-476e554303d9adc030f6e107a164c0a5ad1dfc0c.tar.gz
pfsense-packages-476e554303d9adc030f6e107a164c0a5ad1dfc0c.tar.bz2
pfsense-packages-476e554303d9adc030f6e107a164c0a5ad1dfc0c.zip
Merge pull request #1209 from doktornotor/patch-5
-rw-r--r--config/avahi/avahi.inc26
-rw-r--r--config/avahi/avahi.xml8
-rw-r--r--pkg_config.10.xml3
-rw-r--r--pkg_config.8.xml4
-rw-r--r--pkg_config.8.xml.amd644
5 files changed, 31 insertions, 14 deletions
diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc
index 04f3b343..cd7099cf 100644
--- a/config/avahi/avahi.inc
+++ b/config/avahi/avahi.inc
@@ -28,6 +28,11 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
+require_once('config.inc');
+require_once('interfaces.inc');
+require_once('service-utils.inc');
+require_once('util.inc');
+
$pfs_version = substr(trim(file_get_contents("/etc/version")), 0, 3);
if ($pfs_version == "2.1" || $pfs_version == "2.2") {
define('AVAHI_BASE', '/usr/pbi/avahi-' . php_uname("m"));
@@ -63,8 +68,7 @@ function avahi_deinstall() {
}
function avahi_write_config() {
- global $config, $avahi_config;
- conf_mount_rw();
+ global $config;
// Pull some various values out of config.xml
if (isset($config['installedpackages']['avahi']['config'][0])) {
@@ -173,8 +177,16 @@ EOF;
$fd = fopen(AVAHI_BASE . "/etc/avahi/avahi-daemon.conf", "w");
fwrite($fd, $avahiconfig);
fclose($fd);
+}
+
+function avahi_write_rcfile() {
+ global $config;
+ if (isset($config['installedpackages']['avahi']['config'][0])) {
+ $avahi_config = $config['installedpackages']['avahi']['config'][0];
+ } else {
+ $avahi_config = array();
+ }
- /* Write out rc.d startup file */
$start = "/etc/rc.conf_mount_rw\n";
$start .= "if [ ! -d /proc/0 ]; then\n";
$start .= " /bin/mkdir -p /proc\n";
@@ -214,20 +226,26 @@ EOF;
)
);
- conf_mount_ro();
}
function avahi_sync() {
global $config;
+ conf_mount_rw();
if (is_service_running("avahi")) {
stop_service("avahi");
}
avahi_write_config();
+
// Is package enabled?
if ($config['installedpackages']['avahi']['config'][0]['enable']) {
+ avahi_write_rcfile();
start_service("avahi");
+ } else {
+ unlink_if_exists("/usr/local/etc/rc.d/avahi-daemon.sh");
}
+
+ conf_mount_ro();
}
function avahi_upgrade_config() {
diff --git a/config/avahi/avahi.xml b/config/avahi/avahi.xml
index a69c515d..9bdb9c7f 100644
--- a/config/avahi/avahi.xml
+++ b/config/avahi/avahi.xml
@@ -44,20 +44,18 @@
</copyright>
<title>Services: Avahi</title>
<name>avahi</name>
- <version>1.10.1</version>
- <savetext>Save</savetext>
+ <version>1.10.4</version>
<include_file>/usr/local/pkg/avahi.inc</include_file>
<menu>
<name>Avahi</name>
- <tooltiptext>Modify avahi settings.</tooltiptext>
<section>Services</section>
- <url>pkg_edit.php?xml=avahi.xml</url>
+ <url>/pkg_edit.php?xml=avahi.xml</url>
</menu>
<service>
<name>avahi</name>
<rcfile>avahi-daemon.sh</rcfile>
<executable>avahi-daemon</executable>
- <description>Avahi zeroconf/mDNS daemon</description>
+ <description>Avahi Zeroconf/mDNS Daemon</description>
</service>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index cd8858e6..1f19e3f6 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -273,12 +273,13 @@
<ports_after>net/avahi-app devel/dbus</ports_after>
</build_pbi>
<depends_on_package_pbi>avahi-0.6.31-##ARCH##.pbi</depends_on_package_pbi>
- <version>1.10.3</version>
+ <version>1.10.4</version>
<status>BETA</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/avahi/avahi.xml</config_file>
<configurationfile>avahi.xml</configurationfile>
<after_install_info>Please visit Services - Avahi menu, enable the service and select which interfaces you do NOT wish Avahi to listen on. Save settings to start the service.</after_install_info>
+ <maximum_version>2.2.999</maximum_version>
</package>
<package>
<name>ntop</name>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 701acfc7..5b894299 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -303,8 +303,8 @@
</build_pbi>
<depends_on_package>avahi-app-0.6.29_1.tbz</depends_on_package>
<depends_on_package_pbi>avahi-0.6.31-i386.pbi</depends_on_package_pbi>
- <version>0.6.31 pkg v1.10.3</version>
- <status>ALPHA</status>
+ <version>0.6.31 pkg v1.10.4</version>
+ <status>BETA</status>
<required_version>1.2.3</required_version>
<config_file>https://packages.pfsense.org/packages/config/avahi/avahi.xml</config_file>
<configurationfile>avahi.xml</configurationfile>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 1ccbad79..7c5e3b79 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -303,8 +303,8 @@
</build_pbi>
<depends_on_package>avahi-0.6.29.tbz</depends_on_package>
<depends_on_package_pbi>avahi-0.6.31-amd64.pbi</depends_on_package_pbi>
- <version>0.6.31 pkg v1.10.3</version>
- <status>ALPHA</status>
+ <version>0.6.31 pkg v1.10.4</version>
+ <status>BETA</status>
<required_version>1.2.3</required_version>
<config_file>https://packages.pfsense.org/packages/config/avahi/avahi.xml</config_file>
<configurationfile>avahi.xml</configurationfile>