openrdate-1.2 without automake-1.9 dependency

This commit is contained in:
Micha Glave
2014-05-27 15:08:24 +02:00
parent 7aca0501ec
commit 1574be4bf2
5 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
Name the binary 'openrdate' as so not to conflict with the pre-existing ancient
rdate.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
diff -Nuar openrdate-1.1.3.orig/Makefile.am openrdate-1.1.3/Makefile.am
--- openrdate-1.1.3.orig/Makefile.am 2007-11-10 21:15:31.000000000 -0800
+++ openrdate-1.1.3/Makefile.am 2008-06-18 14:27:40.001963783 -0700
@@ -1,15 +1,15 @@
SUBDIRS = src
-bin_PROGRAMS = rdate
+bin_PROGRAMS = openrdate
-rdate_SOURCES= \
+openrdate_SOURCES= \
src/rdate.c
-rdate_LDADD= \
+openrdate_LDADD= \
src/librdate.a
man_MANS= \
- docs/rdate.8
+ docs/openrdate.8
EXTRA_DIST= \
- docs/rdate.8
+ $(man_MANS)

View File

@@ -0,0 +1,13 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openrdate/files/openrdate-confd,v 1.1 2008/06/18 21:55:26 robbat2 Exp $
# the NTP or RFC868/time server to get the date from
RDATE_SERVER="pool.ntp.org"
# Options to pass to rdate
# "-s" is mandatory to set the system time, and
# is passed regardless of this variable.
# "-n" says that we are using an NTP server instead of a RFC868/time server.
# "-c" is for leap seconds, which is needed on NTP servers.
OPENRDATE_OPTS="-n -c"

View File

@@ -0,0 +1,27 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openrdate/files/openrdate-initd,v 1.1 2008/06/18 21:55:26 robbat2 Exp $
depend() {
before cron
need net
use dns
}
checkconfig() {
if [ -z "${RDATE_SERVER}" ] ; then
eerror "Please edit /etc/conf.d/openrdate"
eerror "I need to know what server to use!"
return 1
fi
return 0
}
start() {
checkconfig || return $?
ebegin "Setting clock via openrdate"
/usr/bin/openrdate -s ${OPENRDATE_OPTS} ${RDATE_SERVER} > /dev/null
eend $? "Failed to set clock via openrdate"
}