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
34624fafd3
Merge pull request #198 from CanonicalLtd/mwhudson/shift-tab-console
...
an attempt to make shift tab work in the linux console
2017-02-14 10:47:43 +13:00
Michael Hudson-Doyle
f16bc954cf
prevent C-c, C-\ from exiting the installer
2017-02-10 16:17:58 +13:00
Michael Hudson-Doyle
cdbd52d642
an attempt to make shift tab work in the linux console
2017-02-10 16:07:26 +13:00
Michael Hudson-Doyle
e95b624072
more unused stuff
2017-01-26 11:18:35 +13:00
Michael Hudson-Doyle
2408dda6c7
remove references to firstboot (an old name for console-conf?)
2017-01-26 11:18:03 +13:00
Michael Hudson-Doyle
60982157b0
rearrange systemd stuff to only run subiquity on tty1
...
for https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1654085
2017-01-20 16:28:50 +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
Michael Hudson-Doyle
47af1de57e
remove setting of umask, redact wifi password from log file
...
The setting of umask was breaking configuring wifi :(
2016-10-26 11:02:23 +13:00
Michael Hudson-Doyle
ce3735a2ef
set umask in console-conf-tui to make log files private
...
this would also affect any other files console-conf creates, but afaict
that's only the netplan config which (a) should be private too and (b)
is handled specially anyway
2016-10-20 13:41:30 +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
d99d297c33
bin/console-conf-tui: drop requirement for /var/log/syslog to be readable. We don't actually go read it.
2016-08-31 16:21:59 -04:00
Mathieu Trudel-Lapierre
9161580c98
Revert "bin/console-conf-tui: drop requirement for /var/log/syslog to be readable. We don't actually go read it."
...
This reverts commit a7aeb13e99
.
2016-08-31 16:21:01 -04:00
Mathieu Trudel-Lapierre
a7aeb13e99
bin/console-conf-tui: drop requirement for /var/log/syslog to be readable. We don't actually go read it.
2016-08-31 14:57:01 -04: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
Michael Hudson-Doyle
392644262b
ignore SIGQUIT too
2016-08-31 11:10:03 +12:00
Michael Hudson-Doyle
d6cf8e1bcf
prevent C-c / C-x from exiting console conf
...
I've left C-x as a way to get out in dry-run mode as that's useful for
debugging.
2016-08-31 10:58:26 +12: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
Mathieu Trudel-Lapierre
9065a68dc8
Misc bugfix for issues starting on serial console.
...
* 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.
2016-08-30 14:00:14 -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
Mathieu Trudel-Lapierre
69b12f54f9
Configure LOGDIR/LOGFILE for dryrun for the subiquity wrapper
2016-08-09 15:20:15 -04:00
Michael Hudson-Doyle
070a96bcc4
Write stamp file and logs to somewhere more sensible.
2016-08-05 14:41:50 +12:00
Mathieu Trudel-Lapierre
e4e9edacfd
Really drop curtin requirement.
2016-07-28 22:41:49 -04:00
Michael Hudson-Doyle
e4d5c7fa85
stuff
2016-07-28 11:13:19 +12:00
Michael Hudson-Doyle
2c749d944c
Have console-conf and subiquity check differing environments.
...
This means that console-conf no longer needs to have hdparm installed.
I'm not sure console-conf needs to call this at all TBH.
2016-07-26 15:09:44 +12:00
Michael Hudson-Doyle
e95daf25ba
Re-introduce 'subiquity' package for installer specific things.
...
Only move the Application object for now.
2016-07-25 12:51:39 +12:00
Michael Hudson-Doyle
173fdcb77f
rename subiquitycore.core.Controller to Application
...
Also CoreControllerError -> ApplicationError
2016-07-25 12:38:19 +12:00
Mathieu Trudel-Lapierre
be0457f9ea
Don't filter logs at all.
...
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:51:46 -04:00
Mathieu Trudel-Lapierre
848ccabc7d
console_conf: start initial console-conf tree with a custom controller story
...
And a custom Welcome screen to boot; to show the overriding of settings.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:18:54 -04:00
Mathieu Trudel-Lapierre
e1970b6477
Rename subiquity to subiquitycore -- will serve as base classes for everything
...
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:17:01 -04:00
Mathieu Trudel-Lapierre
a721eba5c1
Add an 'install' mode; firstboot will be the default to avoid trashing installs
...
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-28 11:30:40 -04:00
Adam Stokes
390bbdae02
Dont fail on curtin check if in dryrun
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-10-26 10:19:48 -04:00
Ryan Harper
8a441b8301
Introduce safer loading of machine configs
...
- Switch to yaml.safe_load() which throws errors when fed /dev/zero.
- Add a new ProberExecption and bubble that up to the main program
- Update unit tests to mock out repeated calls to safe_load which slowed
down the unittest run.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-23 10:03:04 -05:00
Ryan Harper
f43bca96a3
Add environment check on startup
...
Use an environment check function to test if the env is
configured for running subiquity.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-22 14:39:25 -05:00
Ryan Harper
aba2963779
Add control-c signal handler
...
Control-c dumps python stack trace. Instead, just exit cleanly by
hooking SIGINT.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-21 10:18:34 -05:00
Adam Stokes
b16374fa8e
Rename to subiquity-tui for package install
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-28 11:20:22 -04:00
Ryan Harper
d85bb52a63
Finish enabling EFI boot mode
...
- Fix up issues with efi mode grub serial configuration
- Modify blockdev model to order storage configuration output
- Handle when we're running in uefi mode
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 22:19:54 -05:00
Ryan Harper
8a0e9ebdfd
Add new cli option to read machine probe data from file
...
Allow user to specify a probert machine configuration file to be
used during the installer. If presented with the config file
no probing of the host will occur.
In the case that disks don't have a size in the data collected then
they'll be marked as USED.
Add a few example machines and update the README on how to specify.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-28 13:22:29 -05:00
Adam Stokes
01bd932bee
Dont chunk the data line
...
Was causing some formatting issues with python's builtin splitlines
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 16:10:20 -04:00
Adam Stokes
e5915a3559
update installed finish text
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 15:42:37 -04:00
Ryan Harper
65b9cb396a
Add postinstall cleanup
...
Inject a postinstall config to curtin installer to cleanup cloud image
on target.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-23 14:57:42 -05:00
Ryan Harper
09fdf0033f
Merge branch 'grub2' into merge_grub2
...
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-22 09:13:10 -05:00
Ryan Harper
c139f9ccf3
Change curtin_wrap to reboot on success.
...
grub2 supports rebooting into the newly installed image so change
curtin_wrap to reboot upon successful install.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-21 19:06:05 -05:00
Adam Stokes
f429372d3c
refactor controller code and signal handling
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-21 11:55:02 -04:00
Ryan Harper
dabdca2320
Detect successful install
...
Detect successful install by looking at output from
curtin logged to a file. Also read for input from
user on successful install.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 14:00:50 -05:00
Ryan Harper
2b06bdc1da
Call curtin to complete install
...
- Use updated probert *Info class for accessing object data
- Add --dry-run parameter to prevent invoking curtin when testing
- Add new make target to run ui-view by default with --dry-run
- Use a template to write out curtin config file for installation
- Use virtio disks and multiple nics to test probing.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 12:34:24 -05:00
Adam Stokes
dc153cb54a
add network view/controller
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-24 15:44:48 -04:00
Adam Stokes
66ff8fef18
add controller policy
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-24 14:28:47 -04:00
Adam Stokes
7ca2624fb1
more logging
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-23 13:09:26 -04:00
Adam Stokes
d480c49415
add logging
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-23 13:02:01 -04:00
Adam Stokes
c780386ceb
more work on routing controllers
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-23 12:40:10 -04:00
Adam Stokes
dcb0337fdc
additional models
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-22 16:34:37 -04:00
Ryan Harper
d3c0b55dbe
Call curtin installer from subiquity
...
Hacky method, but in welcome controller, use subprocess to
call a script which invokes curtin at a known location with
a specific set of parameters.
Modify the installer configuration and start-up scripts to
ensure Subiquity runs on tty1 and keeps the service running.
Upon hitting 'Confirm' Subiquity will exec curtin_wrap.sh
which calls the *real* curtin. Cloud-init user-data has been
modified to unpack the curtin archive embedded.
When complete, the target.img file is bootable.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-17 15:47:23 -05:00
Adam Stokes
bbc0e317f5
Provide separate palette mapping for monochrome
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-16 19:14:41 -04:00
Adam Stokes
ce18689b94
Split out controllers/views, add additional UI utilities
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-10 18:43:56 -04:00
Adam Stokes
8d1894641f
add curses display for serial
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-10 17:31:04 -04:00
Adam Stokes
389fdf17cb
Add initial start view, buttons, and utilities
...
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-10 16:59:55 -04:00