From 7c9f75b4ee9855ddcd1a035ece8b59b587db72a8 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 30 Aug 2016 20:02:19 -0400 Subject: [PATCH] Yet more agetty tweaks to start console-conf correctly in a lazy manner. --- bin/console-conf-wait | 1 + bin/console-conf-wrapper | 10 ---------- debian/changelog | 18 +++++++++--------- debian/console-conf.console-conf@.service | 2 +- debian/console-conf.install | 2 +- .../console-conf.serial-console-conf@.service | 2 +- 6 files changed, 13 insertions(+), 22 deletions(-) create mode 100755 bin/console-conf-wait delete mode 100755 bin/console-conf-wrapper diff --git a/bin/console-conf-wait b/bin/console-conf-wait new file mode 100755 index 00000000..e063ca35 --- /dev/null +++ b/bin/console-conf-wait @@ -0,0 +1 @@ +Press enter to configure. diff --git a/bin/console-conf-wrapper b/bin/console-conf-wrapper deleted file mode 100755 index 1c7114bf..00000000 --- a/bin/console-conf-wrapper +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e - -trap true HUP INT QUIT TSTP - -logger -t console-conf -- "Starting with parameters: $@" - -echo -n 'Press enter to configure: ' -read REPLY -exec console-conf "$@" diff --git a/debian/changelog b/debian/changelog index dc362702..62668443 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,15 +1,15 @@ subiquity (0.0.13) UNRELEASED; urgency=medium [ Mathieu Trudel-Lapierre ] - * debian/console-conf.*.serial: Start the console-conf wrappers from - their path in /usr/share/subiquity; no need to have them in /usr/bin. - * bin/console-conf-serial-wrapper: add --serial to the command-line. - * debian/console-conf.serial-console-conf@.service: don't pass --serial, - this is meant to be parameters to agetty, not to the login program. - - [ Steve Langasek ] - * debian/console-conf-wrapper: trap various signals in our shell script, - as they should be in console-conf itself. + * bin/console-conf-wait: replace console-conf-wrapper with an issue file + that agetty can show on screen while waiting for user input. + * debian/console-conf.*.service: configure agetty to wait for user input + before running our login program (console-conf), and display our issue + file in the meantime. Always clear the screen, so that the issue text + isn't obscured by other line noise. + * debian/console-conf.serial-console-conf@.service: pass --serial as an + explicit login-program option to avoid it being seen as a parameter to + agetty. [ Michael Hudson-Doyle ] * Prevent C-c, C-\ and C-x from exiting console-conf. diff --git a/debian/console-conf.console-conf@.service b/debian/console-conf.console-conf@.service index 29b16b84..53f5d324 100644 --- a/debian/console-conf.console-conf@.service +++ b/debian/console-conf.console-conf@.service @@ -11,7 +11,7 @@ ConditionPathExists=!/var/lib/console-conf/complete [Service] Environment=PYTHONPATH=/usr/share/subiquity ExecStartPre=/bin/systemctl stop getty@%I -ExecStart=-/sbin/agetty -n --noclear -l /usr/share/subiquity/console-conf-wrapper %I $TERM +ExecStart=-/sbin/agetty -n --keep-baud -f /usr/share/subiquity/console-conf-wait -w -l /usr/bin/console-conf %I $TERM ExecStop=/bin/systemctl start getty@%I #ExecStopPost=/bin/echo "Post stop, starting getty@%I" #ExecStopPost=/bin/systemctl start getty@%I diff --git a/debian/console-conf.install b/debian/console-conf.install index f7627695..5bbc6070 100644 --- a/debian/console-conf.install +++ b/debian/console-conf.install @@ -1,3 +1,3 @@ bin/console-conf-tui usr/share/subiquity -bin/console-conf-wrapper usr/share/subiquity +bin/console-conf-wait usr/share/subiquity usr/share/subiquity/console_conf diff --git a/debian/console-conf.serial-console-conf@.service b/debian/console-conf.serial-console-conf@.service index 6c12a2b5..cb77ffa1 100644 --- a/debian/console-conf.serial-console-conf@.service +++ b/debian/console-conf.serial-console-conf@.service @@ -8,7 +8,7 @@ ConditionPathExists=!/var/lib/console-conf/complete [Service] Environment=PYTHONPATH=/usr/share/subiquity ExecStartPre=/bin/systemctl stop serial-getty@%I -ExecStart=-/sbin/agetty -n --noclear --keep-baud -l /usr/share/subiquity/console-conf-wrapper --login-options "--serial" 115200,38400,9600 %I $TERM +ExecStart=-/sbin/agetty -n --keep-baud -f /usr/share/subiquity/console-conf-wait -w -l /usr/bin/console-conf --login-options "--serial" 115200,38400,9600 %I $TERM ExecStop=/bin/systemctl start serial-getty@%I Type=idle Restart=always