Commit Graph

54150 Commits

Author SHA1 Message Date
Fredrik Holmqvist
ff7da47aa9 Spelling error on notCondition. 2015-07-23 10:48:41 +02:00
Fredrik Holmqvist
8a9464f30c Don't use keywords and and not for variables. 2015-07-23 10:44:03 +02:00
Axel Dörfler
2fb7433b58 launch_daemon: Fixed Alexander's logic mixup.
* The warning in GCC 4 is just that, a warning. It doesn't mean
  the previous version was wrong :-)
2015-07-23 09:03:36 +02:00
Axel Dörfler
353af6bf04 Installer: reboot after install, don't shutdown. 2015-07-23 09:01:03 +02:00
Alexander von Gluck IV
739e7bdb66 launch_daemon: Fix missing logic parentheses
* These are not superfluous on gcc4+ :-)
2015-07-22 16:39:27 -05:00
Augustin Cavalier
990a73c29a Mail: Use BToolBar and vector icons.
Fixes #9519. Partially using the patch there, but most of this
is my own work.
2015-07-22 17:38:00 -04:00
Augustin Cavalier
58ee42e9df BToolBar: Add a "text" parameter.
For defining the text that appears alongside the icon.

This function really has too many parameters; we probably should break
it out into a BAction class...
2015-07-22 17:37:56 -04:00
Rene Gollent
006fd65396 Add missing launch definition for net_server. 2015-07-22 17:19:02 -04:00
Axel Dörfler
2ca4f3f81d launch_daemon: Jobs were started before their target.
* A job must not be launched when its target hasn't been launched
  yet. This fixes Tracker launching when the mount_server scanned
  the initial disk, even though the FirstBootPrompt was showing.
* Jobs are no longer initialized when their target has not been launched
  yet. This also means that you cannot talk to a service beforehand in
  this case.
* Slight refactoring and clarifying, even added some documentation :-)
* _TriggerJob() is now called _LaunchJob(), and does all the checks for
  jobs that _LaunchJobs() does now for targets.
2015-07-22 20:45:47 +02:00
Axel Dörfler
65ed8a5e87 Added post-install script, and start UserBootscript again.
* This is the final missing piece of the former boot process.
* Removed the unused Bootscript, and Bootscript.cd files.
2015-07-22 20:45:43 +02:00
Axel Dörfler
58fd8acd78 Added BLaunchRoster documentation.
* Untested, and could use some more love when it comes to possible
  error codes.
2015-07-22 20:45:38 +02:00
Axel Dörfler
326e03f721 BLaunchRoster: removed be_launch_roster again.
* Not implemented, an unused -- no need for a global instance.
2015-07-22 20:45:33 +02:00
Axel Dörfler
5e17d2d743 mount_server: Ported to a launch_daemon world.
* Now inherits from BServer, and gets its message port from the
  launch_daemon.
* It registers an event "initial_volumes_mounted" that allows other
  services to be started afterwards.
* This is now used in the boot launch files, and makes the scripting
  based previous solution superfluous which has been removed with this
  commit, too.
* This implements the last needed feature in order to reproduce the
  complete former boot process using the launch_daemon.
2015-07-22 20:45:29 +02:00
Axel Dörfler
d94e9c97d2 launch_daemon: Added support for external events.
* Other apps can register events, and the launch_daemon can act on them
  when they are triggered.
2015-07-22 20:45:24 +02:00
Axel Dörfler
2c756e16e0 launch_daemon: Fixed job event trigger.
* Always check for events before launching a job unconditionally.
* Correctly check for demand before launching a job.
2015-07-22 20:45:20 +02:00
Axel Dörfler
f6647de349 launch_daemon: Fixed NULL events.
* Also, events now can actually be NULL when there is an empty "on"
  field in the settings.
* This fixes a crash, too.
2015-07-22 20:45:15 +02:00
Axel Dörfler
f2afa73344 launch_daemon: Divided MessageReceived() into several methods.
* Was getting huge.
2015-07-22 20:45:11 +02:00
Axel Dörfler
d54bb194d7 launch_daemon: Empty conditions are now NULL.
* Instead of an empty and-condition.
2015-07-22 20:45:06 +02:00
Axel Dörfler
95d93d2ea9 launch_daemon: Fixed empty on/if parsing.
* An extra empty message was mistakenly created.
2015-07-22 20:45:02 +02:00
Axel Dörfler
f7b5ecfe00 hey: Added -h and --help for usage text.
* Didn't do anything before that.
* Removed some useless comments.
* This file could really need a cleanup.
2015-07-22 20:44:57 +02:00
Axel Dörfler
5b6c827e82 launch_daemon: Outlined basic event mechanism. 2015-07-22 20:44:53 +02:00
Axel Dörfler
1ec3f11d97 Create installer link in live mode, check existence.
* FirstBootPrompt as well as the Installer do not exist on the
  minimum image, so take this into account when making the startup
  target decisions.
2015-07-22 20:44:48 +02:00
Axel Dörfler
a7ef196cf1 launch_daemon: Improved error reporting, minor cleanup. 2015-07-22 20:44:44 +02:00
Axel Dörfler
abb7b71004 launch_daemon: Fixed a race condition in Worker startup.
* When the thread is started during the construction of the base
  class, the virtual method table may still point to the methods
  of the base class when the thread actually starts to run.
* This caused the main worker to have a timeout, which could
  eventually be reached which in turn caused all job processing
  to stop.
* That's what you get when you do Java all day; whoever designed
  C++ should be slapped (I'm talking to you, Bjarne).
2015-07-22 20:44:39 +02:00
Axel Dörfler
5a76694819 launch_daemon: Added events parsing.
* Including tests, also for the environment parsing.
2015-07-22 20:44:34 +02:00
Axel Dörfler
3888dd6e73 launch_daemon: Fixed condition tests build.
* ConditionContext changed.
2015-07-22 20:44:30 +02:00
Axel Dörfler
76fb7c29e0 Installer: Unblock CD tray, and eject it, shutdown on quit.
* This was done in the Bootscript.cd before, but now the Installer
  does it directly, but only in case the Deskbar is not running.
2015-07-22 20:44:25 +02:00
Axel Dörfler
19a4ba1015 launch_daemon: Now blocks the CD tray on read-only /boot. 2015-07-22 20:44:21 +02:00
Axel Dörfler
634aefe4fd launch_daemon: Now supports getting the env from a script.
* Scripts from targets are evaluated once on first target launch,
  scripts from jobs are evaluated on each start.
* The "desktop" target now sources SetupEnvironment as usual.
2015-07-22 20:44:16 +02:00
Axel Dörfler
463d38e40b Fixed exec*(), and __flatten_process_args() with NULL env.
* Not sure if it's following any standard, but environ can be NULL
  (either by manually setting it to NULL, or by calling clearenv()).
2015-07-22 20:44:12 +02:00
Axel Dörfler
ea19a80ed6 launch_daemon: Added support for setting env.
* We cannot "source" files through a shell yet, though.
2015-07-22 20:44:07 +02:00
Axel Dörfler
fb7dad2b49 BRoster: Added ability to pass env on launch.
* Added BRoster::Private::Launch() that adds an additional parameter
  to pass a pointer to the environment of the launched app.
2015-07-22 20:44:03 +02:00
Axel Dörfler
06e0f8079f registrar: Fixed app_server detection.
* This also fixes the shutdown process, as the registrar no longer
  kills the app_server.
* Removed SERVER_PORT_NAME definition as it has no use anymore.
2015-07-22 20:43:58 +02:00
Axel Dörfler
05a567f609 Added autologin command, and use it by default.
* This will handle our current single-user login needs.
* Removed Login from the minimum image again.
2015-07-22 20:43:54 +02:00
Axel Dörfler
1281fcd3cb launch_daemon: Improved job overwriting.
* Certain things are set on job construction only.
* Now checks if the message has the field before updating it.
* Might not be final yet (it is confusing that 'requires' will add to
  the requirements, but 'launch' will replace all arguments).
2015-07-22 20:43:49 +02:00
Axel Dörfler
4c67f79c2c FirstBootPrompt: launch installer/desktop targets directly.
* No need for shell scripting here.
2015-07-22 20:43:44 +02:00
Axel Dörfler
bd1c9bf338 launch_daemon: Set some HOME/LC_TYPE defaults. 2015-07-22 20:43:40 +02:00
Axel Dörfler
a3211522d9 launch_daemon: Fixed registering session daemon.
* Still used the old protocol.
* Minor cleanup.
2015-07-22 20:43:35 +02:00
Axel Dörfler
638ee09556 data/launch/user: Fixed FirstBootPrompt location.
* Now started via signature (it lives in bin, not apps).
2015-07-22 20:43:30 +02:00
Axel Dörfler
7987907008 launch_daemon: We can now talk to the authentication manager.
* When creating the port of the registrar's authentication manager, we
  now set it manually, so that the user/group functions work.
* This allows LaunchDaemon::_StartSession() to set up the user, and
  groups as needed.
2015-07-22 20:43:26 +02:00
Axel Dörfler
560119c9a4 launch_daemon: Don't verify passwords.
* Instead, the caller should have done this already. This is really
  outside of the scope of the launch_daemon.
* Fixed Login with empty passwords; removed the (unused) test login
  feature along the way.
2015-07-22 20:43:22 +02:00
Axel Dörfler
cb82874e92 multiuser_utils: Fixed verifying empty password.
* verify_password() would accept all passwords if the there was
  none set, instead of accepting only an empty password.
2015-07-22 20:43:17 +02:00
Axel Dörfler
e0fc09b439 launch_daemon: Conditions now know if they are constant.
* This allows to remove a job in the init phase already, if its
  condition is not only constant, but also failing.
* Also removed the special Job::LaunchInSafeMode() method; this is now
  done using the conditions (the config option no_safemode remains,
  though).
2015-07-22 20:43:13 +02:00
Axel Dörfler
004cd6709d launch_daemon: Added run directive.
* Allows to conditionally (or unconditionally) launch targets.
* Including tests for the settings parser.
* FirstBootPrompt is now launched when deemed necessary (as in
  the Bootscript).
2015-07-22 20:43:08 +02:00
Axel Dörfler
d91addd24c launch_daemon: Added Condition::ToString() method.
* For debugging purposes only.
2015-07-22 20:43:03 +02:00
Axel Dörfler
cefd7c496d Sudoku: Improved value hint.
* Removed toggling its visibility on click - it's now always visible
  once it's there.
* Also update and show it when changing a value or hint.
2015-07-22 20:42:59 +02:00
Axel Dörfler
0e347cb203 launch_daemon: Added condition tests. 2015-07-22 20:42:54 +02:00
Axel Dörfler
17ac467a6e launch_daemon: Actually set the conditions. 2015-07-22 20:42:50 +02:00
Axel Dörfler
c2d703ea5d launch_daemon: Make sure conditions are properly deleted. 2015-07-22 20:42:45 +02:00
Axel Dörfler
1e9c987102 launch_daemon: Added basic support for conditions.
* Admittedly not very well thought out, but it should be good
  enough for now; it doesn't really make sense to initialize jobs
  that is never run due to failed conditions.
* Job, and Target now have a common base class BaseJob that deals
  with the conditions.
2015-07-22 20:42:41 +02:00