mirror of
git://slackware.nl/current.git
synced 2024-12-26 09:58:59 +01:00
bace514a49
a/findutils-4.10.0-x86_64-1.txz: Upgraded. a/logrotate-3.22.0-x86_64-1.txz: Upgraded. Thanks to opty for getting our changes accepted upstream. a/sysvinit-scripts-15.1-noarch-18.txz: Rebuilt. rc.M: start dnsmasq before ntpd. Thanks to lostintime. d/git-2.45.2-x86_64-1.txz: Upgraded. d/poke-4.1-x86_64-1.txz: Upgraded. kde/fcitx5-configtool-5.1.6-x86_64-1.txz: Upgraded. kde/kwin-5.27.11-x86_64-2.txz: Rebuilt. Recompiled against wayland-1.23.0 since it seems they broke the ABI. Let me know if anything else needs help. kde/libindi-2.0.8-x86_64-1.txz: Upgraded. l/mujs-1.3.4-x86_64-1.txz: Added. l/python-zipp-3.19.1-x86_64-1.txz: Upgraded. n/ntp-4.2.8p18-x86_64-2.txz: Rebuilt. rc.ntp: properly create the PID file on start. Add /etc/default/ntp to configure ntpd startup options since some people are needing to add -4 to avoid an error. Thanks to rkelsen and teoberi. x/fcitx5-5.1.10-x86_64-1.txz: Upgraded. x/fcitx5-chinese-addons-5.1.6-x86_64-1.txz: Upgraded. x/fcitx5-hangul-5.1.4-x86_64-1.txz: Upgraded. x/fcitx5-kkc-5.1.4-x86_64-1.txz: Upgraded. x/fcitx5-table-extra-5.1.6-x86_64-1.txz: Upgraded. x/fcitx5-table-other-5.1.3-x86_64-1.txz: Upgraded. x/libime-1.1.8-x86_64-1.txz: Upgraded. x/xcb-imdkit-1.0.9-x86_64-1.txz: Upgraded. xap/blueman-2.4.2-x86_64-1.txz: Upgraded. xap/mpv-0.38.0-x86_64-3.txz: Rebuilt. Recompiled against mujs-1.3.4.
59 lines
907 B
Bash
59 lines
907 B
Bash
#!/bin/sh
|
|
# Start/stop/restart ntpd.
|
|
|
|
# Load options from /etc/default/ntp:
|
|
. /etc/default/ntp
|
|
|
|
# Start ntpd:
|
|
ntpd_start() {
|
|
echo -n "Starting NTP daemon: /usr/sbin/ntpd $NTPD_OPTS"
|
|
/usr/sbin/ntpd $NTPD_OPTS
|
|
echo
|
|
}
|
|
|
|
# Stop ntpd:
|
|
ntpd_stop() {
|
|
echo -n "Stopping NTP daemon... "
|
|
if [ -r /run/ntpd.pid ]; then
|
|
echo -n "(PID $(cat /run/ntpd.pid))"
|
|
kill -HUP $(cat /run/ntpd.pid)
|
|
rm -f /run/ntpd.pid
|
|
else
|
|
killall --ns $$ -HUP -q ntpd
|
|
fi
|
|
echo
|
|
}
|
|
|
|
# Restart ntpd:
|
|
ntpd_restart() {
|
|
ntpd_stop
|
|
sleep 1
|
|
ntpd_start
|
|
}
|
|
|
|
# Check if ntpd is running
|
|
ntpd_status() {
|
|
if [ -e /run/ntpd.pid ]; then
|
|
echo "ntpd is running as PID $(cat /run/ntpd.pid)."
|
|
else
|
|
echo "ntpd is stopped."
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
ntpd_start
|
|
;;
|
|
'stop')
|
|
ntpd_stop
|
|
;;
|
|
'restart')
|
|
ntpd_restart
|
|
;;
|
|
'status')
|
|
ntpd_status
|
|
;;
|
|
*)
|
|
echo "usage $0 start|stop|restart|status"
|
|
esac
|