[X2Go-Commits] [live-build-x2go] 42/160: added time setting script

git-admin at x2go.org git-admin at x2go.org
Sat Nov 18 01:55:37 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/openbox
in repository live-build-x2go.

commit 63d3ddaa3849b168273ee193e4a999f34d051763
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Sun Jul 23 15:08:00 2017 +0200

    added time setting script
---
 .../includes.chroot/lib/live/config/2050-settime   | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/config/includes.chroot/lib/live/config/2050-settime b/config/includes.chroot/lib/live/config/2050-settime
new file mode 100755
index 0000000..dddfb1d
--- /dev/null
+++ b/config/includes.chroot/lib/live/config/2050-settime
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+SetTime ()
+{
+
+# Output startup message
+#
+echo -n " settime"
+
+cat >/etc/network/if-up.d/0050-settime <<SHOWIPS
+#!/bin/bash
+export TERM=linux;
+
+while [ -z "\$(hostname -I)" ] ; do
+	echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n)
+	sleep 2
+done
+if ntpdate-debian -s && hwclock --systohc ; then
+	echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty\$(fgconsole -n)
+else
+	echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty\$(fgconsole -n)
+fi
+
+chmod 755 /etc/network/if-up.d/0050-settime
+
+}
+
+SetTime

--
Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list