Commit Graph

26 Commits

Author SHA1 Message Date
Ian Johnson ab27c235b0
bin/console-conf-wrapper: only run if available
Otherwise on a system without support for `snap routine console-conf-start`, console-conf will never actually run. 

Thanks to @xnox for the suggestion.

Co-authored-by: Dimitri John Ledkov <19779+xnox@users.noreply.github.com>
2020-11-02 09:40:22 -06:00
Ian Johnson 7cc528ac6d bin/console-conf-wrapper: start snapd console-conf routine after user interacts
After the user has pressed enter to being using console-conf, we should invoke
the snapd routine for console-conf, which currently does the following:
* Unconditionally delays refreshes for 20 minutes from when first invoked.
* Blocks waiting for all pending refreshes to complete, including if those
  involve a reboot.

This is the first step towards a more integrated user story where console-conf
is a part of the first-boot process, and at least will minimize user confusion
where console-conf proceeds asking about network configuration and then just
hangs when snapd starts a refresh as soon as network is available.

The snap routine console-conf-start command was merged to snapd with 
https://github.com/snapcore/snapd/pull/9418 and will be first available in snapd
2.48.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-10-27 15:09:49 -05:00
Dimitri John Ledkov 4ef44df38d
Merge pull request #771 from mvo5/subiquity-show-install-logs
console-conf-wrapper: show snapd log during install
2020-05-21 14:22:04 +01:00
Michael Vogt e748115ea9 console-conf: show journal log during install
Display the snapd journal while the system installs. This will
give us important clues what might go wrong during a install
and also gives the user some sense of progress.

For post-beta we need to think if we really want to display this
level of detail. OTOH we don't expect people to watch the console
during firstboot yet and if that will happen we need to also tweak
a bunch more (like kernel messages, systemd messages etc).
2020-05-19 11:19:27 +02:00
Michael Vogt c5ee7c95d5 console-conf-wrapper: show snapd log during install
This will help finding some of the current install problems by
showing the snapd log on the terminal during the install.
2020-05-18 09:29:36 +02:00
Maciej Borzecki bd859a9a4b bin/console-conf-wrapper: check /var/lib/console-conf/complete when in recovery
Once console-conf is started for recovery chooser, exit early when the recovery
chooser does not exist.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-05-13 18:27:20 +02:00
Ian Johnson 3238dba4d2 bin/console-conf-wrapper: don't do anything during install mode
For now, we want to just block console-conf from doing anything in install mode,
i.e. allowing a user to login etc. but eventually we will probably want to show
more useful status information from snapd during the install mode process.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-04-29 13:50:42 -05:00
Dimitri John Ledkov 5f9fae19b6 Revert "consoleconf: watch changes on install"
Doesn't work

This reverts commit 7b4bcb9922.
2020-04-20 15:30:04 +01:00
Dimitri John Ledkov 7b4bcb9922 consoleconf: watch changes on install 2020-04-06 17:24:18 +01:00
Maciek Borzecki fc09279772 bin/console-conf-wrapper: detect whether snapd recovery chooser should run
Look for the marker file left by snapd recovery chooser user request detection
and attempt to run the chooser.

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2020-02-24 11:07:40 +01:00
Michael Hudson-Doyle 435ed77ade fix crash on startup with no ip address
console-conf-write-login-details would crash if it ran before the system
got an ip address. re-jig things a bit so that it displays an nice message
when there is no ip address but still checks for a new address every 5s until
it finds one.
2017-03-28 15:54:50 +13:00
Michael Hudson-Doyle 3facaab59e more care around how ttyname is displayed 2017-02-17 15:08:12 +13:00
Michael Hudson-Doyle a8fce4da0f write login-details.txt atomically 2016-11-10 12:45:56 +13:00
Michael Hudson-Doyle 7c7fc8218f shuffle things around so that it works for a user created via an assertion 2016-11-10 11:59:39 +13:00
Michael Hudson-Doyle 7bef718e18 re-work logic, including having console-conf generate the file to show 2016-11-09 14:33:58 +13:00
Michael Hudson-Doyle cbd2aa5321 mvo's patch to show a message until a user has a password 2016-11-09 14:23:31 +13:00
Michael Hudson-Doyle c3a5a78784 turn off input echoing while waiting for return character
see LP: #1639917
2016-11-09 14:17:20 +13:00
Mathieu Trudel-Lapierre fc10303150 Update code to follow latest `snap managed` API. 2016-10-07 11:34:45 -04:00
Mathieu Trudel-Lapierre 8478f1ab47 console-conf-wrapper: output of snap is-managed is "system is managed".
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-10-05 13:39:52 -04:00
Michael Hudson-Doyle 89e68d2b50 exit console-conf immediately on a managed device 2016-10-04 17:12:51 +13:00
Michael Hudson-Doyle a4add7037d Use console-conf-wrapper on the serial line again.
This means that the "Please press enter to configure" message is actually shown
now. But it turns out we need some stty magic so that newline actually works to
enter console-conf.

Fixes https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1621142
2016-09-13 15:44:30 +12:00
Mathieu Trudel-Lapierre 98cf79175e More shuffling for gettys: reinstate the wrapper for VTs, make sure we display the issue file. 2016-08-30 22:20:00 -04:00
Mathieu Trudel-Lapierre 7c9f75b4ee Yet more agetty tweaks to start console-conf correctly in a lazy manner. 2016-08-30 20:02:19 -04:00
Steve Langasek 7184f61937 debian/console-conf-wrapper: trap various signals in our shell script, as they should be in console-conf itself. 2016-08-30 15:31:50 -07:00
Mathieu Trudel-Lapierre ddbb1abc9f More wrapper fixes for serial console. 2016-08-30 16:59:15 -04:00
Michael Hudson-Doyle acbaa05eb7 Add a shell wrapper for console-conf
This is Steve's idea for reducing the RAM used at rest.
2016-08-30 12:16:42 +12:00