[X2Go-Commits] [live-build-x2go] 02/166: ipconfig

git-admin at x2go.org git-admin at x2go.org
Mon Nov 20 02:16:37 CET 2017


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

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

commit 6e5dc5346bb43ac14465e47847b867c21494c946
Author: Stefan Baur <kontakt at baur-itcs.de>
Date:   Mon Jun 20 16:54:50 2016 +0200

    ipconfig
---
 .../includes.chroot/lib/live/config/2000-ipconfig  | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/config/includes.chroot/lib/live/config/2000-ipconfig b/config/includes.chroot/lib/live/config/2000-ipconfig
new file mode 100644
index 0000000..fb108ea
--- /dev/null
+++ b/config/includes.chroot/lib/live/config/2000-ipconfig
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+IFConfig ()
+{
+
+# Output startup message
+#
+echo -n " ifconfig"
+
+#setterm -term linux -r >/dev/tty9
+# Make sure no language-specific stuff interferes with our matching
+# grep: highlight everything that matches "inet" to the end of its line
+# and also (-E, |$) show every line that has an end => Everything else
+# Output the result on virtual terminal 9
+cat >/etc/network/if-up.d/showips <<SHOWIPS
+#!/bin/bash
+export TERM=linux;
+
+while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do
+        sleep 2
+done
+
+IPMSG=\$(LANG=C \
+/sbin/ip a | \
+/bin/grep -P --color=always "inet.*? [\. 0-9a-f:/]*? |$" | \
+GREP_COLOR="1;32" \
+/bin/grep -P --color=always "link/ether .*? |$" ); \
+IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ); 
+sed -i '/^- /d' /etc/issue; 
+sed -i '/^- /d' /etc/issue.net; 
+echo "\$IPMSG" >> /etc/issue; 
+echo "\$IPMSG" >> /etc/issue.net 
+SHOWIPS
+
+chmod 755 /etc/network/if-up.d/showips
+
+}
+
+IFConfig

--
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