From fefbdbdf1ca711873f5f237d3945a753efcd04ce Mon Sep 17 00:00:00 2001 From: slin14 Date: Mon, 22 Oct 2018 20:57:52 +0800 Subject: [PATCH] remove un-used files in ntp Story: 2004133 Task: 27579 Change-Id: I49a2fb2bca48715f577374e33c3e7a68cd670fd6 Signed-off-by: slin14 --- base/ntp/ntp-4.2.6p5/ntp-cgcs.conf | 14 ---- base/ntp/ntp-4.2.6p5/ntpd | 108 ----------------------------- base/ntp/ntp-4.2.8p6/ntp-cgcs.conf | 14 ---- base/ntp/ntp-4.2.8p6/ntpd | 108 ----------------------------- 4 files changed, 244 deletions(-) delete mode 100644 base/ntp/ntp-4.2.6p5/ntp-cgcs.conf delete mode 100755 base/ntp/ntp-4.2.6p5/ntpd delete mode 100644 base/ntp/ntp-4.2.8p6/ntp-cgcs.conf delete mode 100755 base/ntp/ntp-4.2.8p6/ntpd diff --git a/base/ntp/ntp-4.2.6p5/ntp-cgcs.conf b/base/ntp/ntp-4.2.6p5/ntp-cgcs.conf deleted file mode 100644 index 991f836d1..000000000 --- a/base/ntp/ntp-4.2.6p5/ntp-cgcs.conf +++ /dev/null @@ -1,14 +0,0 @@ -# This is the most basic ntp configuration file -# The driftfile must remain in a place specific to this -# machine - it records the machine specific clock error -#driftfile /etc/ntp.drift -# This obtains a random server which will be close -# (in IP terms) to the machine. Add other servers -# as required, or change this. -#server time.server.example.com -# Using local hardware clock as fallback -# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself -#server 127.127.1.0 -#fudge 127.127.1.0 stratum 14 -# Defining a default security setting - lock everything down -restrict default ignore diff --git a/base/ntp/ntp-4.2.6p5/ntpd b/base/ntp/ntp-4.2.6p5/ntpd deleted file mode 100755 index 7c9b423fb..000000000 --- a/base/ntp/ntp-4.2.6p5/ntpd +++ /dev/null @@ -1,108 +0,0 @@ -#! /bin/sh -# -# ntpd init.d script for ntpdc from ntp.isc.org -#chkconfig: 2345 20 20 - -# Source function library. -. /etc/init.d/functions - -test -x /usr/sbin/ntpd -a -r /etc/ntp.conf || exit 0 -# rcS contains TICKADJ -test -r /etc/default/rcS && . /etc/default/rcS - -# Functions to do individual actions -settick(){ - # If TICKADJ is set we *must* adjust it before we start, because the - # driftfile relies on the correct setting - test -n "$TICKADJ" -a -x /usr/sbin/tickadj && { - echo -n "Setting tick to $TICKADJ: " - /usr/sbin/tickadj "$TICKADJ" - echo "done" - } -} -startdaemon(){ - # Perform initial ntp time correction - if [ -e /etc/ntp_initial.conf ] - then - echo -n "Performing initial ntp time correction: " - # ntpd -q hangs forever if it can't reach a server, so the timeout - # command is used to avoid this - /usr/bin/timeout 60s /usr/sbin/ntpd -q -g -c /etc/ntp_initial.conf - rc=$? - if [[ $rc == 0 ]] - then - echo "done" - # Time correction successful. Set hardware clock. - echo -n "Setting hardware clock: " - /sbin/hwclock -wu - if [[ $? == 0 ]] - then - echo "done" - else - echo "failed" - fi - else - echo "fail - hardware clock used to set system time" - fi - fi - - # We do not use the -g option to start the ntpd. That allows the ntpd to - # make large time corrections. Although the man page says this will be - # done only once, testing indicates it can happen multiple times or - # happen long after the daemon starts, which can break services that - # are already running at that time. - echo -n "Starting ntpd: " - /sbin/start-stop-daemon --start -x /usr/sbin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@" - echo "done" -} -stopdaemon(){ - echo -n "Stopping ntpd: " - /sbin/start-stop-daemon --stop -p /var/run/ntp.pid - echo "done" - - # Set the hardware clock on shutdown so the clock will be as accurate as possible - # when the system comes back up. - echo -n "Setting hardware clock: " - /sbin/hwclock -wu - if [[ $? == 0 ]] - then - echo "done" - else - echo "failed" - fi -} - -case "$1" in - start) - settick - startdaemon - ;; - stop) - stopdaemon - ;; - status) - status /usr/sbin/ntpd; - exit $? - ;; - force-reload) - stopdaemon - settick - startdaemon - ;; - restart) - # Don't reset the tick here - stopdaemon - startdaemon - ;; - reload) - # Must do this by hand, but don't do -g - stopdaemon - startdaemon - ;; - *) - echo "Usage: ntpd { start | stop | status | restart | reload }" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/base/ntp/ntp-4.2.8p6/ntp-cgcs.conf b/base/ntp/ntp-4.2.8p6/ntp-cgcs.conf deleted file mode 100644 index 60e18c7e1..000000000 --- a/base/ntp/ntp-4.2.8p6/ntp-cgcs.conf +++ /dev/null @@ -1,14 +0,0 @@ -# This is the most basic ntp configuration file -# The driftfile must remain in a place specific to this -# machine - it records the machine specific clock error -#driftfile /etc/ntp.drift -# This obtains a random server which will be close -# (in IP terms) to the machine. Add other servers -# as required, or change this. -#server time.server.example.com -# Using local hardware clock as fallback -# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself -#server 127.127.1.0 -#fudge 127.127.1.0 stratum 14 -# Defining a default security setting -restrict default diff --git a/base/ntp/ntp-4.2.8p6/ntpd b/base/ntp/ntp-4.2.8p6/ntpd deleted file mode 100755 index 7c9b423fb..000000000 --- a/base/ntp/ntp-4.2.8p6/ntpd +++ /dev/null @@ -1,108 +0,0 @@ -#! /bin/sh -# -# ntpd init.d script for ntpdc from ntp.isc.org -#chkconfig: 2345 20 20 - -# Source function library. -. /etc/init.d/functions - -test -x /usr/sbin/ntpd -a -r /etc/ntp.conf || exit 0 -# rcS contains TICKADJ -test -r /etc/default/rcS && . /etc/default/rcS - -# Functions to do individual actions -settick(){ - # If TICKADJ is set we *must* adjust it before we start, because the - # driftfile relies on the correct setting - test -n "$TICKADJ" -a -x /usr/sbin/tickadj && { - echo -n "Setting tick to $TICKADJ: " - /usr/sbin/tickadj "$TICKADJ" - echo "done" - } -} -startdaemon(){ - # Perform initial ntp time correction - if [ -e /etc/ntp_initial.conf ] - then - echo -n "Performing initial ntp time correction: " - # ntpd -q hangs forever if it can't reach a server, so the timeout - # command is used to avoid this - /usr/bin/timeout 60s /usr/sbin/ntpd -q -g -c /etc/ntp_initial.conf - rc=$? - if [[ $rc == 0 ]] - then - echo "done" - # Time correction successful. Set hardware clock. - echo -n "Setting hardware clock: " - /sbin/hwclock -wu - if [[ $? == 0 ]] - then - echo "done" - else - echo "failed" - fi - else - echo "fail - hardware clock used to set system time" - fi - fi - - # We do not use the -g option to start the ntpd. That allows the ntpd to - # make large time corrections. Although the man page says this will be - # done only once, testing indicates it can happen multiple times or - # happen long after the daemon starts, which can break services that - # are already running at that time. - echo -n "Starting ntpd: " - /sbin/start-stop-daemon --start -x /usr/sbin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@" - echo "done" -} -stopdaemon(){ - echo -n "Stopping ntpd: " - /sbin/start-stop-daemon --stop -p /var/run/ntp.pid - echo "done" - - # Set the hardware clock on shutdown so the clock will be as accurate as possible - # when the system comes back up. - echo -n "Setting hardware clock: " - /sbin/hwclock -wu - if [[ $? == 0 ]] - then - echo "done" - else - echo "failed" - fi -} - -case "$1" in - start) - settick - startdaemon - ;; - stop) - stopdaemon - ;; - status) - status /usr/sbin/ntpd; - exit $? - ;; - force-reload) - stopdaemon - settick - startdaemon - ;; - restart) - # Don't reset the tick here - stopdaemon - startdaemon - ;; - reload) - # Must do this by hand, but don't do -g - stopdaemon - startdaemon - ;; - *) - echo "Usage: ntpd { start | stop | status | restart | reload }" >&2 - exit 1 - ;; -esac - -exit 0