From 79c11d149484d919457c4b719da51b88a0fc5151 Mon Sep 17 00:00:00 2001 From: Daniel Stefan Haischt Date: Mon, 15 Jan 2007 18:00:49 +0000 Subject: * announce ntp service type via zeroconf --- packages/freenas/pkg/freenas_services.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'packages') diff --git a/packages/freenas/pkg/freenas_services.inc b/packages/freenas/pkg/freenas_services.inc index 184be1ec..5c206413 100644 --- a/packages/freenas/pkg/freenas_services.inc +++ b/packages/freenas/pkg/freenas_services.inc @@ -1621,6 +1621,24 @@ EOD; file_put_contents("/usr/local/etc/avahi/services/rsync.service", $rsyncservice); } // end if + + /* add ntp service type */ + if ($config['ntpd']['mode'] == "server") { + $ntpdservice = str_replace("@PORT@", + "123", + $service_template); + $ntpdservice = str_replace("@TYPE@", + "_ntp._udp", + $ntpdservice); + $ntpdservice = str_replace("@SERVICE_DESC@", + "Network Time Daemon", + $ntpdservice); + $ntpdservice = str_replace("@TXT_RECORDS@", + "", + $ntpdservice); + + file_put_contents("/usr/local/etc/avahi/services/ntpd.service", $ntpdservice); + } // end if if (isset($config['system']['ssh']['enable'])) { $sshservice = str_replace("@PORT@", -- cgit v1.2.3