[X2Go-Commits] [live-build-x2go] 39/42: passing multiple ntp server names/IPs wasn't workung; should work now
git-admin at x2go.org
git-admin at x2go.org
Wed Jan 24 18:11:43 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch feature/mate-minidesktop-stretch
in repository live-build-x2go.
commit aa38ff0f5ebece578eea87b89ec5c329c0c934e8
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date: Wed Jan 24 14:42:28 2018 +0100
passing multiple ntp server names/IPs wasn't workung; should work now
---
config/includes.chroot/lib/live/config/2000-settime | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime
index 7bbdd14..bdd9a32 100755
--- a/config/includes.chroot/lib/live/config/2000-settime
+++ b/config/includes.chroot/lib/live/config/2000-settime
@@ -15,16 +15,18 @@ if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then
exit 0
fi
-NTPSERVERS=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \
+NTPSERVERS=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \
awk -F'=' ' /^ntp=/ { print \$2 }' | \
- tr -dc 'a-zA-Z0-9.\-' | \
+ tr -dc 'a-zA-Z0-9.\- ' | \
tr '[:upper:]' '[:lower:]' )
if [ "\$NTPSERVERS" = "false" ] || [ "\$NTPSERVERS" = "off" ] || [ "\$NTPSERVERS" = "0" ] ; then
NTPCOMMAND="false"
elif [ -n "\$NTPSERVERS" ] ; then
+ echo -en "\n\$(date +'%F | %T | ')'\$0': Using ntp server(s) '$NTPSERVERS'. First working one in list will be used." | tee -a /dev/tty8
NTPCOMMAND="ntpdate -s -b \$NTPSERVERS"
else
+ echo -en "\n\$(date +'%F | %T | ')'\$0': Using Debian's default ntp servers." | tee -a /dev/tty8
NTPCOMMAND="ntpdate-debian -s -b"
fi
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
More information about the x2go-commits
mailing list