[PC-BSD Commits] r438 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts

svn at pcbsd.org svn at pcbsd.org
Mon Jul 9 13:36:51 PDT 2007


Author: kris
Date: 2007-07-09 21:36:51 +0100 (Mon, 09 Jul 2007)
New Revision: 438

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.TimeZone.sh
Log:

Fixed bugs with enabling / disabling NTP properly, now it won't enable
twice, and it will be disabled properly if requested. 



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.TimeZone.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.TimeZone.sh	2007-07-09 20:22:01 UTC (rev 437)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.TimeZone.sh	2007-07-09 20:36:51 UTC (rev 438)
@@ -7,18 +7,12 @@
 # Setup TimeZone First
 cp /mnt/usr/share/zoneinfo/${TZONE} /mnt/etc/localtime
 
-# Setup NTP if we need to
-if [ "${NTP}" = "0" ]
+# If the user disabled NTPD, do so now
+if [ "${NTP}" != "0" ]
 then
-echo "server 0.pool.ntp.org prefer
-server 1.pool.ntp.org
-server 2.pool.ntp.org
 
-driftfile /var/db/ntp.drift" >/mnt/etc/ntp.conf
+cat /mnt/etc/rc.conf | grep -v "ntpd_enable" >/mnt/.rc.conf
+mv /mnt/.rc.conf /mnt/etc/rc.conf
 
-echo "
-# Enable NTP Service
-ntpd_enable=\"YES\"" >> /mnt/etc/rc.conf
-
 fi
 



More information about the Commits mailing list