Update of /cvsroot/leaf/src/bering-uclibc/apps/ntp
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24182
Modified Files:
buildtool.cfg buildtool.mk ntp.conf
Added Files:
ntp-4.2.2p3.tar.gz ntp-nolynx.patch ntp-wait ntp.daily
ntp.default ntp.ifup ntp.init ntp.weekly
Removed Files:
ntp ntp-nolynx.patch.gz ntp_4.2.0a+stable-8.diff.gz
ntp_4.2.0a+stable.orig.tar.gz ntpdate.cron ntpdate.default
ntpdate.init ntpsimpl.daily ntpsimpl.ifup ntpsimpl.weekly
Log Message:
removed deprecated ntpdate, improved ntpsimpl package (thanks to Erich Titl)
and renamed to ntpd, updated to version 4.2.2p3. The ntpd package is now a full
replacement for ntpsimpl/ntpdate. For a simpler and smaller alternative look at
the opentpd package
--- ntp_4.2.0a+stable-8.diff.gz DELETED ---
--- NEW FILE: ntp.weekly ---
#! /bin/sh
# if there is no 'logfile /var/log/ntpd' line in /etc/ntp.conf, ntpd will log
# via syslog, and output will show up in daemon.log. this log rotation code
# is therefore conditionalized such that we won't stop and restart the daemon
# unless we're not using syslog and need to rotate the /var/log/ntpd file.
if [ -x /usr/sbin/ntpd ]
then
if [ -f /var/log/ntpd ]
then
/etc/init.d/ntp stop > /dev/null
savelog -g wheel -m 644 -u root -c 4 /var/log/ntpd > /dev/null
/etc/init.d/ntp start > /dev/null
fi
fi
--- ntpsimpl.daily DELETED ---
Index: buildtool.mk
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/ntp/buildtool.mk,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** buildtool.mk 28 Mar 2005 16:10:39 -0000 1.8
--- buildtool.mk 18 Nov 2006 19:34:46 -0000 1.9
***************
*** 2,12 ****
include $(MASTERMAKEFILE)
! NTP_DIR:=ntp-4.2.0a+stable.orig
NTP_TARGET_DIR:=$(BT_BUILD_DIR)/ntp
$(NTP_DIR)/.source:
zcat $(NTP_SOURCE) | tar -xvf -
! zcat $(NTP_PATCH1) | patch -d $(NTP_DIR) -p1
! zcat $(NTP_PATCH2) | patch -d $(NTP_DIR) -p1
touch $(NTP_DIR)/.source
--- 2,11 ----
include $(MASTERMAKEFILE)
! NTP_DIR:=ntp-4.2.2p3
NTP_TARGET_DIR:=$(BT_BUILD_DIR)/ntp
$(NTP_DIR)/.source:
zcat $(NTP_SOURCE) | tar -xvf -
! cat $(NTP_PATCH1) | patch -d $(NTP_DIR) -p1
touch $(NTP_DIR)/.source
***************
*** 14,19 ****
$(NTP_DIR)/.configured: $(NTP_DIR)/.source
! (cd $(NTP_DIR) ; autoconf ; chmod +x ./configure ; \
! CC=$(TARGET_CC) LD=$(TARGET_LD) LDFLAGS="-s" CFLAGS="$(BT_COPT_FLAGS)"
\
./configure --prefix=/usr \
--without-openssl-libdir \
--- 13,17 ----
$(NTP_DIR)/.configured: $(NTP_DIR)/.source
! (cd $(NTP_DIR) ; CC=$(TARGET_CC) LD=$(TARGET_LD) LDFLAGS="-s"
CFLAGS="$(BT_COPT_FLAGS)" \
./configure --prefix=/usr \
--without-openssl-libdir \
***************
*** 27,31 ****
--sysconfdir=/var/lib/ntp \
--disable-errorcache );
-
touch $(NTP_DIR)/.configured
--- 25,28 ----
***************
*** 36,42 ****
$(NTP_DIR)/.build: $(NTP_DIR)/.configured
mkdir -p $(NTP_TARGET_DIR)
! mkdir -p $(NTP_TARGET_DIR)/etc/default
! mkdir -p $(NTP_TARGET_DIR)/etc/init.d
! mkdir -p $(NTP_TARGET_DIR)/etc/cron.d
mkdir -p $(NTP_TARGET_DIR)/etc/cron.daily
mkdir -p $(NTP_TARGET_DIR)/etc/cron.weekly
--- 33,38 ----
$(NTP_DIR)/.build: $(NTP_DIR)/.configured
mkdir -p $(NTP_TARGET_DIR)
! mkdir -p $(NTP_TARGET_DIR)/etc/init.d
! mkdir -p $(NTP_TARGET_DIR)/etc/default
mkdir -p $(NTP_TARGET_DIR)/etc/cron.daily
mkdir -p $(NTP_TARGET_DIR)/etc/cron.weekly
***************
*** 44,59 ****
mkdir -p $(NTP_TARGET_DIR)/usr/sbin
make -C $(NTP_DIR) all
! -$(BT_STRIP) $(BT_STRIP_BINOPTS) $(NTP_DIR)/ntpdate/ntpdate
! -$(BT_STRIP) $(BT_STRIP_BINOPTS) $(NTP_DIR)/ntpd/ntpd
! cp -a $(NTP_DIR)/ntpdate/ntpdate $(NTP_TARGET_DIR)/usr/sbin
! cp -a $(NTP_DIR)/ntpd/ntpd $(NTP_TARGET_DIR)/usr/sbin
! cp -a ntpdate.default $(NTP_TARGET_DIR)/etc/default/ntpdate
! cp -a ntpdate.cron $(NTP_TARGET_DIR)/etc/cron.d/ntpdate
! cp -a ntpdate.init $(NTP_TARGET_DIR)/etc/init.d/ntpdate
! cp -a ntp $(NTP_TARGET_DIR)/etc/init.d/ntp
! cp -a ntp.conf $(NTP_TARGET_DIR)/etc/ntp.conf
! cp -a ntpsimpl.daily $(NTP_TARGET_DIR)/etc/cron.daily/ntpsimpl
! cp -a ntpsimpl.weekly $(NTP_TARGET_DIR)/etc/cron.weekly/ntpsimpl
! cp -a ntpsimpl.ifup $(NTP_TARGET_DIR)/etc/network/if-up.d/ntpsimpl
cp -a $(NTP_TARGET_DIR)/* $(BT_STAGING_DIR)/
touch $(NTP_DIR)/.build
--- 40,54 ----
mkdir -p $(NTP_TARGET_DIR)/usr/sbin
make -C $(NTP_DIR) all
! -$(BT_STRIP) $(BT_STRIP_BINOPTS) $(NTP_DIR)/ntpd/ntpd
! -$(BT_STRIP) $(BT_STRIP_BINOPTS) $(NTP_DIR)/ntpq/ntpq
! cp -a $(NTP_DIR)/ntpd/ntpd $(NTP_TARGET_DIR)/usr/sbin
! cp -a $(NTP_DIR)/ntpq/ntpq $(NTP_TARGET_DIR)/usr/sbin
! cp -a ntp-wait $(NTP_TARGET_DIR)/usr/sbin
! cp -a ntp.init $(NTP_TARGET_DIR)/etc/init.d/ntp
! cp -a ntp.default $(NTP_TARGET_DIR)/etc/default/ntp
! cp -a ntp.conf $(NTP_TARGET_DIR)/etc/ntp.conf
! cp -a ntp.daily $(NTP_TARGET_DIR)/etc/cron.daily/ntp
! cp -a ntp.weekly $(NTP_TARGET_DIR)/etc/cron.weekly/ntp
! cp -a ntp.ifup $(NTP_TARGET_DIR)/etc/network/if-up.d/ntp
cp -a $(NTP_TARGET_DIR)/* $(BT_STAGING_DIR)/
touch $(NTP_DIR)/.build
--- ntpdate.init DELETED ---
--- ntpdate.cron DELETED ---
--- NEW FILE: ntp-4.2.2p3.tar.gz ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: ntp-nolynx.patch ---
diff -urN ntp-4.2.2p3.orig/Makefile.in ntp-4.2.2p3/Makefile.in
--- ntp-4.2.2p3.orig/Makefile.in 2006-08-05 21:49:27.000000000 +0200
+++ ntp-4.2.2p3/Makefile.in 2006-09-06 15:54:52.000000000 +0200
@@ -271,7 +271,7 @@
# DIST_HOOK_DIRS = conf html scripts ports
# HMS: Keep .gcc-warning first, as that way it gets printed first.
-BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version
$(srcdir)/version.m4 $(srcdir)/include/version.def
+BUILT_SOURCES = .gcc-warning $(srcdir)/version $(srcdir)/version.m4
$(srcdir)/include/version.def
# HMS: The following seems to be a work-in-progress...
CVO = `$(srcdir)/config.guess`
--- ntp_4.2.0a+stable.orig.tar.gz DELETED ---
--- NEW FILE: ntp.init ---
#! /bin/sh
# Ntp time server daemon
RCDLINKS="0,K20 1,K20 2,S20 3,S20 4,S20 5,S20 6,K20"
test -f /usr/sbin/ntpd || exit 0
if [ ! -d /var/lib/ntp ]; then
mkdir /var/lib/ntp
echo "0.0" > /var/lib/ntp/ntp.drift
fi
if [ ! -d /var/log/ntpstats ]; then
mkdir /var/log/ntpstats
fi
# Include ntp defaults if available
if [ -r /etc/default/ntp ] ; then
. /etc/default/ntp
fi
case "$1" in
start)
echo -n "Starting NTP server: ntpd"
start-stop-daemon --start --quiet --exec /usr/sbin/ntpd --
$NTPD_OPTS
[ "$NTP_WAIT" == "YES" -a -x /usr/sbin/ntp-wait ] &&
/usr/sbin/ntp-wait $NTP_WAIT_TIMEOUT
echo "."
;;
stop)
echo -n "Stopping NTP server: ntpd"
start-stop-daemon --stop --quiet --exec /usr/sbin/ntpd
echo "."
;;
restart|force-reload)
echo -n "Restarting NTP server: ntpd... "
start-stop-daemon --stop --quiet --exec /usr/sbin/ntpd
sleep 2
start-stop-daemon --start --quiet --exec /usr/sbin/ntpd --
$NTPD_OPTS
echo "done."
;;
*)
echo "Usage: /etc/init.d/ntp {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
--- ntp-nolynx.patch.gz DELETED ---
--- NEW FILE: ntp.daily ---
#!/bin/sh
# the default Debian ntp.conf enables logging of various statistics to the
# /var/log/ntpstats directory. the daemon automatically changes to a new
# datestamped set of files at midnight, so all we need to do is delete old
# ones, and compress the ones we're keeping so disk usage is controlled
LOGDIR=/var/log/ntpstats
if [ -d $LOGDIR ]
then
# only keep a week's depth of these
rm -f `find $LOGDIR -type f -mtime +7`;
# compress whatever is left to save space
filelist=`find $LOGDIR -name *stats.\* -type f | grep -v .gz`;
[ "$filelist" != "" ] && gzip $filelist ;
fi
--- ntpdate.default DELETED ---
--- ntpsimpl.weekly DELETED ---
--- ntp DELETED ---
--- NEW FILE: ntp.ifup ---
#!/bin/sh
# remove (or comment out) the next line if your network addresses change
exit 0
case $IFACE in
eth*)
/etc/init.d/ntp restart
;;
esac
--- ntpsimpl.ifup DELETED ---
Index: buildtool.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/ntp/buildtool.cfg,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** buildtool.cfg 26 Jun 2006 17:48:16 -0000 1.8
--- buildtool.cfg 18 Nov 2006 19:34:46 -0000 1.9
***************
*** 5,9 ****
</File>
! <File ntp_4.2.0a+stable.orig.tar.gz>
Server = cvs-sourceforge
Revision = HEAD
--- 5,9 ----
</File>
! <File ntp-4.2.2p3.tar.gz>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 12,16 ****
</File>
! <File ntp_4.2.0a+stable-8.diff.gz>
Server = cvs-sourceforge
Revision = HEAD
--- 12,16 ----
</File>
! <File ntp-nolynx.patch>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 19,36 ****
</File>
! <File ntp-nolynx.patch.gz>
! Server = cvs-sourceforge
! Revision = HEAD
! Directory = ntp
! Envname = NTP_PATCH2
! </File>
!
! <File ntpdate.default>
! Server = cvs-sourceforge
! Revision = HEAD
! Directory = ntp
! </File>
!
! <File ntpdate.init>
Server = cvs-sourceforge
Revision = HEAD
--- 19,23 ----
</File>
! <File ntp.conf>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 38,42 ****
</File>
! <File ntpdate.cron>
Server = cvs-sourceforge
Revision = HEAD
--- 25,29 ----
</File>
! <File ntp.init>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 44,48 ****
</File>
! <File ntp.conf>
Server = cvs-sourceforge
Revision = HEAD
--- 31,35 ----
</File>
! <File ntp.default>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 50,54 ****
</File>
! <File ntp>
Server = cvs-sourceforge
Revision = HEAD
--- 37,41 ----
</File>
! <File ntp.daily>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 56,60 ****
</File>
! <File ntpsimpl.daily>
Server = cvs-sourceforge
Revision = HEAD
--- 43,47 ----
</File>
! <File ntp.weekly>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 62,66 ****
</File>
! <File ntpsimpl.weekly>
Server = cvs-sourceforge
Revision = HEAD
--- 49,53 ----
</File>
! <File ntp.ifup>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 68,72 ****
</File>
! <File ntpsimpl.ifup>
Server = cvs-sourceforge
Revision = HEAD
--- 55,59 ----
</File>
! <File ntp-wait>
Server = cvs-sourceforge
Revision = HEAD
***************
*** 74,86 ****
</File>
-
<Package>
! <ntpdate>
! Version = 4.2.0a-8
Revision = 1
Help <<EOF
! client for setting system time from NTP servers
Homepage: http://www.ntp.org
LEAF package by __PACKAGER__, __BUILDDATE__
EOF
--- 61,73 ----
</File>
<Package>
! <ntpd>
! Version = 4.2.2p3
Revision = 1
Help <<EOF
! NTP v4 daemon
Homepage: http://www.ntp.org
+ Requires: libm.lrp
LEAF package by __PACKAGER__, __BUILDDATE__
EOF
***************
*** 98,104 ****
<Contents>
<File>
! Filename = etc/default/ntpdate
! Source = etc/default/ntpdate
! Description = ntpdate server configuration
Type = conf
Type = local
--- 85,91 ----
<Contents>
<File>
! Filename = etc/ntp.conf
! Source = etc/ntp.conf
! Description = ntp configuration
Type = conf
Type = local
***************
*** 107,166 ****
</File>
<File>
! Filename = etc/cron.d/ntpdate
! Source = etc/cron.d/ntpdate
! Description = ntpdate cron
Type = binary
! Permissions = 644
</File>
<File>
! Filename = etc/init.d/ntpdate
! Source = etc/init.d/ntpdate
! Description = ntpdate init file
! Type = binary
Permissions = 755
</File>
<File>
! Filename = usr/sbin/ntpdate
! Source = usr/sbin/ntpdate
Type = binary
Permissions = 755
</File>
- </Contents>
- </ntpdate>
-
- <ntpsimpl>
- Version = 4.2.0a-8
- Revision = 1
-
- Help <<EOF
- NTP v4 daemon for simple system (from Debian)
- Homepage: http://www.ntp.org
- Requires: libm.lrp
- LEAF package by __PACKAGER__, __BUILDDATE__
- EOF
-
- <Permissions>
- Files = 644
- Directories = 755
- </Permissions>
-
- <Owner>
- Files = root:root
- Directories = root:root
- </Owner>
-
- <Contents>
<File>
! Filename = etc/ntp.conf
! Source = etc/ntp.conf
! Description = ntp configuration
! Type = conf
! Type = local
! Type = binary
! Permissions = 600
</File>
<File>
! Filename = etc/network/if-up.d/ntpsimpl
! Source = etc/network/if-up.d/ntpsimpl
Description = ntp if-up script
Type = conf
--- 94,128 ----
</File>
<File>
! Filename = etc/cron.daily/ntp
! Source = etc/cron.daily/ntp
! Description = ntp cron daily
Type = binary
! Permissions = 755
</File>
<File>
! Filename = etc/cron.weekly/ntp
! Source = etc/cron.weekly/ntp
! Description = ntp cron weekly
! Type = binary
Permissions = 755
</File>
<File>
! Filename = etc/init.d/ntp
! Source = etc/init.d/ntp
! Description = ntp init file
Type = binary
Permissions = 755
</File>
<File>
! Filename = etc/default/ntp
! Source = etc/default/ntp
! Description = ntp daemon config
! Type = conf
! Type = local
! Type = binary
</File>
<File>
! Filename = etc/network/if-up.d/ntp
! Source = etc/network/if-up.d/ntp
Description = ntp if-up script
Type = conf
***************
*** 170,206 ****
</File>
<File>
! Filename = etc/cron.daily/ntpsimpl
! Source = etc/cron.daily/ntpsimpl
! Description = ntp cron daily
! Type = binary
! Permissions = 755
! </File>
! <File>
! Filename = etc/cron.weekly/ntpsimpl
! Source = etc/cron.weekly/ntpsimpl
! Description = ntp cron weekly
! Type = binary
Permissions = 755
</File>
<File>
! Filename = etc/init.d/ntp
! Source = etc/init.d/ntp
! Description = ntp init file
Type = binary
Permissions = 755
</File>
<File>
! Filename = usr/sbin/ntpd
! Source = usr/sbin/ntpd
Description = ntpd
Type = binary
Permissions = 755
</File>
- <File>
- Filename = var/lib/ntp
- Type = directory
- </File>
</Contents>
! </ntpsimpl>
</Package>
-
\ No newline at end of file
--- 132,156 ----
</File>
<File>
! Filename = usr/sbin/ntpd
! Source = usr/sbin/ntpd
! Description = ntpd
! Type = binary
Permissions = 755
</File>
<File>
! Filename = usr/sbin/ntpq
! Source = usr/sbin/ntpq
! Description = ntpd
Type = binary
Permissions = 755
</File>
<File>
! Filename = usr/sbin/ntp-wait
! Source = usr/sbin/ntp-wait
Description = ntpd
Type = binary
Permissions = 755
</File>
</Contents>
! </ntpd>
</Package>
--- NEW FILE: ntp.default ---
# NTPD options
NTPD_OPTS="-g"
# should we wait for ntpd to be synchronized
#NTP_WAIT=YES
#NTP_WAIT_TIMEOUT=60
Index: ntp.conf
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/ntp/ntp.conf,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ntp.conf 23 Mar 2005 21:28:53 -0000 1.3
--- ntp.conf 18 Nov 2006 19:34:47 -0000 1.4
***************
*** 16,21 ****
# *** Please consider joining the pool! ***
# *** <http://www.pool.ntp.org/#join> ***
! server pool.ntp.org
! #server pool.ntp.org
! ## uncomment for extra reliability
!
--- 16,18 ----
# *** Please consider joining the pool! ***
# *** <http://www.pool.ntp.org/#join> ***
! server pool.ntp.org iburst
--- NEW FILE: ntp-wait ---
#!/bin/sh
#
# Copyleft 2006 Erich Titl ([EMAIL PROTECTED])
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
# set a default of 100 seconds (loops), else use the number passed as first
parameter
loops=${1:-100}
while [ $loops -gt 0 ]
do
export `ntpq -c "rv 0 state" | grep state`
case $state in
3|4) break;;
*) logger -p info -t "$0" ntpd not yet synchronized;;
esac
sleep 1
loops=$(($loops - 1))
done
case $loops in
0) logger -s -p err -t "$0" ntp could not synchronize to external time
source;
exit 255;;
*) logger -p info -t "$0" ntpd synchronized;;
esac
exit 0
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits