summaryrefslogtreecommitdiff
path: root/source/n/ntp
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2013-11-04 17:08:47 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:57:36 +0200
commit76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch)
tree9b98e6e193c7870cb27ac861394c1c4592850922 /source/n/ntp
parent9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff)
downloadcurrent-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.gz
Slackware 14.1slackware-14.1
Mon Nov 4 17:08:47 UTC 2013 Slackware 14.1 x86_64 stable is released! It's been another interesting release cycle here at Slackware bringing new features like support for UEFI machines, updated compilers and development tools, the switch from MySQL to MariaDB, and many more improvements throughout the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/n/ntp')
-rw-r--r--source/n/ntp/doinst.sh12
-rwxr-xr-xsource/n/ntp/ntp.SlackBuild2
-rw-r--r--source/n/ntp/rc.ntpd15
3 files changed, 27 insertions, 2 deletions
diff --git a/source/n/ntp/doinst.sh b/source/n/ntp/doinst.sh
index 1e74ce44..bc542990 100644
--- a/source/n/ntp/doinst.sh
+++ b/source/n/ntp/doinst.sh
@@ -9,10 +9,20 @@ config() {
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
config etc/ntp.conf.new
config etc/ntp/ntp.keys.new
if [ -r etc/rc.d/rc.ntpd -a -r etc/rc.d/rc.ntpd.new ]; then
chmod --reference=etc/rc.d/rc.ntpd etc/rc.d/rc.ntpd.new
fi
-config etc/rc.d/rc.ntpd.new
+mv etc/rc.d/rc.ntpd.new etc/rc.d/rc.ntpd
diff --git a/source/n/ntp/ntp.SlackBuild b/source/n/ntp/ntp.SlackBuild
index d89863e7..f514aa6c 100755
--- a/source/n/ntp/ntp.SlackBuild
+++ b/source/n/ntp/ntp.SlackBuild
@@ -22,7 +22,7 @@
PKGNAM=ntp
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/n/ntp/rc.ntpd b/source/n/ntp/rc.ntpd
index 7cf3d50b..c1d1411c 100644
--- a/source/n/ntp/rc.ntpd
+++ b/source/n/ntp/rc.ntpd
@@ -7,6 +7,21 @@ ntpd_start() {
echo -n "Starting NTP daemon: $CMDLINE"
$CMDLINE -p /var/run/ntpd.pid
echo
+ # The kernel is now mocking around with the the hardware clock if
+ # ntpd is running, so if the hardware clock (wall clock) is set to
+ # 'localtime' execute hwclock --localtime --systohc to disable the
+ # 11 minute mode kernel function:
+ if [ -x /sbin/hwclock ]; then
+ # Check for a broken motherboard RTC clock (where ioports for rtc are
+ # unknown) to prevent hwclock causing a hang:
+ if ! grep -q -w rtc /proc/ioports ; then
+ CLOCK_OPT="--directisa"
+ fi
+ if ! grep -q "^UTC" /etc/hardwareclock 2> /dev/null ; then
+ echo "Saving system time to the hardware clock (localtime)."
+ /sbin/hwclock $CLOCK_OPT --localtime --systohc
+ fi
+ fi
}
# Stop ntpd: