This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119377 additions and 73694 deletions

View File

@@ -0,0 +1,20 @@
sntp/libopts/m4/libopts.m4: allow override shell with POSIX_SHELL
Pull in fix from upstream AutoGen [1] to accept POSIX_SHELL from the
environment during the configure step.
[1] http://git.savannah.gnu.org/cgit/autogen.git/commit/?id=db064b9a252f3ef3d8db25411ea0edb0ff8ea758
Signed-off-by: James Byrne <james.byrne@origamienergy.com>
diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4
--- a/sntp/libopts/m4/libopts.m4
+++ b/sntp/libopts/m4/libopts.m4
@@ -114,6 +114,7 @@
AC_PROG_SED
[while :
do
+ test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which bash`
test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which dash`

View File

@@ -1,34 +1,56 @@
#! /bin/sh
#!/bin/sh
#
# Starts Network Time Protocol daemon
#
NAME=ntpd
DAEMON="ntpd"
PIDFILE="/var/run/$DAEMON.pid"
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
NTPD_ARGS="-g"
# shellcheck source=/dev/null
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
start() {
printf 'Starting %s: ' "$DAEMON"
# shellcheck disable=SC2086 # we need the word splitting
start-stop-daemon -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \
-- $NTPD_ARGS -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon -K -q -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start)
printf "Starting $NAME: "
start-stop-daemon -S -q -x /usr/sbin/ntpd -- -g
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping $NAME: "
start-stop-daemon -K -q -n $NAME
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
echo "Restarting $NAME: "
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}" >&2
exit 1
;;
start|stop|restart)
"$1";;
reload)
# Restart, since there is no true "reload" feature.
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
exit 0

View File

@@ -1,5 +1,5 @@
# From https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p13.tar.gz.md5
md5 ea040ab9b4ca656b5229b89d6b822f13 ntp-4.2.8p13.tar.gz
# From http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz.md5
md5 e1e6b23d2fc75cced41801dbcd6c2561 ntp-4.2.8p15.tar.gz
# Calculated based on the hash above
sha256 288772cecfcd9a53694ffab108d1825a31ba77f3a8466b0401baeca3bc232a38 ntp-4.2.8p13.tar.gz
sha256 3828da5fc8126889d6a64432288ace08526c490bf5427d799931689069968d91 COPYRIGHT
sha256 f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19 ntp-4.2.8p15.tar.gz
sha256 957e6a13445cc61ab1ca3dc80d8c269cf9b0a6d9eaec20f9f39639b0b3e66ee8 COPYRIGHT

View File

@@ -5,12 +5,12 @@
################################################################################
NTP_VERSION_MAJOR = 4.2
NTP_VERSION = $(NTP_VERSION_MAJOR).8p13
NTP_VERSION = $(NTP_VERSION_MAJOR).8p15
NTP_SITE = https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJOR)
NTP_DEPENDENCIES = host-pkgconf libevent
NTP_LICENSE = NTP
NTP_LICENSE_FILES = COPYRIGHT
NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no
NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no POSIX_SHELL=/bin/sh
NTP_CONF_OPTS = \
--with-shared \
--program-transform-name=s,,, \
@@ -108,9 +108,6 @@ endef
define NTP_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/ntpd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
endef
endif