[debian-edu-commits] debian-edu/ 01/02: Avoid error when trying to show test results in a tty under systemd. It is currently not possible.

Petter Reinholdtsen pere at moszumanska.debian.org
Sun Sep 14 14:57:23 UTC 2014


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

pere pushed a commit to branch master
in repository debian-edu-install.

commit 9d1e3940963eef95bcb289fd694dd228501079e0
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sun Sep 14 16:55:59 2014 +0200

    Avoid error when trying to show test results in a tty under systemd. It is currently not possible.
---
 debian/changelog                                     |  2 ++
 debian/debian-edu-install.xdebian-edu-firstboot.init | 13 +++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 09ab647..8b33c4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ debian-edu-install (1.800) UNRELEASED; urgency=low
   * Add file system options user_xattr and acl to /skole/tjener/home0/
     and /skole/backup/ in our partitioning recipes, to improve Samba
     support (Closes: #638822).
+  * Avoid error when trying to show test results in a tty under systemd.
+    It is currently not possible.
 
   [ Wolfgang Schweer ]
   * dovecot-core preseeding: use fqdn postoffice.intern as server name.
diff --git a/debian/debian-edu-install.xdebian-edu-firstboot.init b/debian/debian-edu-install.xdebian-edu-firstboot.init
index c6923d1..566c59d 100755
--- a/debian/debian-edu-install.xdebian-edu-firstboot.init
+++ b/debian/debian-edu-install.xdebian-edu-firstboot.init
@@ -25,6 +25,10 @@ firstboot_file=/etc/debian-edu/xdebian-edu-firstboot
 
 set -e
 
+info() {
+    logger -t debian-edu-install "info: $@"
+}
+
 error() {
     logger -t debian-edu-install "error: $@"
 }
@@ -137,6 +141,11 @@ prepare_debconf() {
             export DEBIAN_FRONTEND=gnome
         fi
         export XAUTHORITY DISPLAY
+    elif [ -d /run/systemd/system ] ; then
+        # FIXME Figure out what to do under systemd, where no tty is available!
+        # For now, just give up. :(
+        info "systemd and no X detected, not showing test status"
+        return 1
     fi
 
     . /usr/share/debconf/confmodule
@@ -162,7 +171,7 @@ cleanup_debconf() {
 report_errors() {
     errfile="$2"
 
-    prepare_debconf $@
+    prepare_debconf $@ || return
 
     # Quick fix to make sure all error entries at least are
     # displayed.  The correct fix is to find out how to replace a
@@ -183,7 +192,7 @@ report_errors() {
 }
 
 report_success() {
-    prepare_debconf $@
+    prepare_debconf $@ || return
 
     log_begin_msg "Reporting successful installation"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-install.git



More information about the debian-edu-commits mailing list