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 04fdedb5345d9d22c8f93ab04a217cc19860ccbc Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 12:08:13 2017 +0200 added version and booted system info output, indentation fixed --- .../lib/live/config/2100-showifconfig | 42 ++++++++++++++-------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig index 9ccb02b..0b0cea1 100755 --- a/config/includes.chroot/lib/live/config/2100-showifconfig +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -1,16 +1,16 @@ #!/bin/bash -ShowIFConfig () +ShowSysConf () { # Output startup message # -echo -n " showifconfig" +echo -n " show-sysconf" # 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 -cat >/etc/network/if-up.d/0100-showips <<SHOWIPS +cat >/etc/network/if-up.d/0100-show-sysconf <<SHOWSYSCONF #!/bin/bash export TERM=linux; @@ -29,20 +29,34 @@ fi 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; + /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 + + if grep -q findiso /proc/cmdline ; then + BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | tr " " "\n" | awk -F'=' ' $1 == "findiso" { print \$2 }'))) + echo "- Booted Environment: $BOOTEDENV" >> /etc/issue + echo "- Booted Environment: $BOOTEDENV" >> /etc/issue.net + fi + + if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then + TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) + HUMANTIMESTAMP=\$(date --date="@\$TIMESTAMP") + echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue + echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net + fi ) & -SHOWIPS +SHOWSYSCONF -chmod 755 /etc/network/if-up.d/0100-showips +chmod 755 /etc/network/if-up.d/0100-show-sysconf } -ShowIFConfig +ShowSysConf -- 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