Eelco Dolstra
3f4ffffed7
Fix a Perl warning
2012-08-20 11:32:50 -04:00
Eelco Dolstra
08f14b33c1
Merge branch 'master' of github.com:NixOS/nixos into systemd
2012-08-20 11:27:38 -04:00
Eelco Dolstra
a44e575196
switch-to-configuration: Respect the ‘restartIfChanged’ attribute
2012-08-17 13:14:42 -04:00
Eelco Dolstra
a4a90685ea
switch-to-configuration: Handle swap devices
2012-08-10 15:52:47 -04:00
Eelco Dolstra
a3c75462c1
switch-to-configuration: Handle switching all systemd units
2012-08-10 15:15:59 -04:00
Eelco Dolstra
ce7ead7bd7
switch-to-configuration: Handle changes to fileSystems
...
We now automatically remount filesystems with changed options, mount
new filesystems, and unmount obsolete filesystems.
2012-08-10 10:56:55 -04:00
Eelco Dolstra
f31ab09b85
Set uniq type on boot.loader.kernelFile
2012-08-09 11:00:35 -04:00
Eelco Dolstra
d33fd9a1f8
switch-to-configuration: Assume that services that are auto-restarting are going to fail
2012-08-06 15:48:46 -04:00
Eelco Dolstra
2a91bb5282
switch-to-configuration: Print new units
2012-08-03 17:13:34 -04:00
Eelco Dolstra
320682a558
switch-to-configuration: Don't ellipsize log output
2012-08-03 14:39:59 -04:00
Eelco Dolstra
0d6b96a525
switch-to-configuration: Fix the call to install the boot loader
2012-08-03 14:07:43 -04:00
Eelco Dolstra
aa6fd9f8a2
switch-to-configuration: Handle unit template instances
2012-08-03 13:47:59 -04:00
Eelco Dolstra
bd3c9febc9
switch-to-configuration: Stop units in one call to systemctl
2012-08-03 13:29:56 -04:00
Eelco Dolstra
b6bd0a4f84
switch-to-configuration: Restart services that were manually started
2012-08-03 11:53:14 -04:00
Eelco Dolstra
56ce5614f9
switch-to-configuration: Print all failed services
2012-08-03 10:40:01 -04:00
Eelco Dolstra
4d2deff7af
Stop obsolete units, restart changed units, start new units
2012-08-02 17:26:23 -04:00
Eelco Dolstra
0fc68a3d1d
Rewrite switch-to-configuration in Perl
...
This will make it more efficient to do systemd dependency graph
processing (if necessary).
2012-08-02 15:11:29 -04:00
Eelco Dolstra
d4fec178fd
Merge remote-tracking branch 'origin/master' into systemd
2012-08-02 13:44:16 -04:00
Eelco Dolstra
6576d81ff1
Fix "please: command not found" in switch-to-configuration
2012-07-30 15:19:30 -04:00
Eelco Dolstra
b52117c34d
Treat init-script as a boot loader
2012-07-25 11:30:16 -04:00
Eelco Dolstra
b15e1fbb08
Boot loader refactoring
...
- Renamed system.build.menuBuilder to system.build.installBootLoader.
- ‘install-grub.pl’ (formerly grub-menu-builder.pl) now generates the
GRUB menu *and* installs GRUB (if necessary).
- ‘switch-to-configuration.sh’ has no boot loader specific knowledge
anymore. It just calls installBootLoader.
2012-07-25 10:47:32 -04:00
Eelco Dolstra
f0c82f4543
Pass the ‘--recheck’ flag to grub-install
2012-07-24 19:22:19 -04:00
Eelco Dolstra
f07f221f0e
Replace grub-menu-builder with a much faster version
...
The old GRUB menu builder script is quite slow, typically taking
several seconds. This is a real annoyance since it's run every time
you switch to a new configuration. Therefore this patch replaces the
Bash script with a much faster Perl script. In a VirtualBox test, the
execution time went from 2.7s to 0.1s. The Perl version is also more
correct because it uses XML to get the GRUB configuration (through
builtins.toXML), so there are no shell escaping issues.
The new script currently lacks support for subconfigurations defined
through "nesting.children".
2012-07-24 19:16:27 -04:00
Eelco Dolstra
0edf138fc7
switch-to-configuration: Initial systemd support
...
It reloads the configuration, but doesn't (re)start jobs yet.
2012-07-20 18:25:36 -04:00
Eelco Dolstra
0b865edb16
switch-to-configuration: require a reboot going from Upstart to systemd
2012-07-20 16:23:52 -04:00
Eelco Dolstra
44d091674b
Merge branch 'master' of github.com:NixOS/nixos into systemd
...
Conflicts:
modules/config/networking.nix
modules/services/networking/ssh/sshd.nix
modules/services/ttys/agetty.nix
modules/system/boot/stage-2-init.sh
modules/system/upstart-events/shutdown.nix
2012-07-16 17:27:11 -04:00
Eelco Dolstra
73532c3855
Global replace /var/run/current-system -> /run/current-system
2012-07-16 11:34:21 -04:00
Eelco Dolstra
f21aa7d22c
First attempt at using systemd
...
Basic booting works. Systemd starts agetty instances on tty1 and
tty2. Shutdown and journald also work.
2012-06-04 12:51:48 -04:00
Eelco Dolstra
a6892051ef
* Allow building with boot.loader.grub.enable set to "false".
...
svn path=/nixos/trunk/; revision=34218
2012-05-23 15:52:29 +00:00
Mathijs Kwik
be69799f35
better workaround for building nested child configurations
...
svn path=/nixos/trunk/; revision=34164
2012-05-18 06:17:08 +00:00
Mathijs Kwik
7fca5408f3
Revert "Provided a workaround for grub's missing-devices check, so nested child configurations can still build."
...
This reverts commit a89e8831e3d95bcf3ddc19ee34b938db7e8aa572.
svn path=/nixos/trunk/; revision=34163
2012-05-18 06:17:05 +00:00
Eelco Dolstra
f889ebc488
* Allow runtime changes to boot.devShmSize and friends.
...
svn path=/nixos/trunk/; revision=34160
2012-05-17 19:33:55 +00:00
Mathijs Kwik
88b3c4b82e
Provided a workaround for grub's missing-devices check, so nested child configurations can still build.
...
svn path=/nixos/trunk/; revision=34153
2012-05-17 10:17:32 +00:00
Eelco Dolstra
3dd0718939
* Give an error at evaluation time if boot.loader.grub.device or
...
boot.loader.grub.devices are not set, rather than complaining about
it when it's too late.
svn path=/nixos/trunk/; revision=34081
2012-05-14 01:53:47 +00:00
Eelco Dolstra
03f2847054
* Set preferLocalBuild on a few trivial top-level derivations. These
...
tend to cause a lot of unnecessary I/O to the build machines.
svn path=/nixos/trunk/; revision=33936
2012-04-26 15:19:23 +00:00
Eelco Dolstra
e3879fe365
* Store the NixOS version in the top-level derivation.
...
* Change the name of the top-level derivation from "system" to
"nixos-<version>".
* Show the NixOS version in the GRUB boot menu instead of the kernel
version.
svn path=/nixos/trunk/; revision=33785
2012-04-14 17:09:59 +00:00
Lluís Batlle i Rossell
9fb07d4036
Making a reference single-quoted for grubDevices, as after substitution, there
...
will be doublequoted elements.
Suggested by Kirelagin.
svn path=/nixos/trunk/; revision=33403
2012-03-25 12:36:43 +00:00
Eelco Dolstra
43b5ced96c
* Ignore SIGHUP and write errors on stderr to ensure that
...
switch-to-configuration runs to completion (e.g. if the tty we're on
got killed).
svn path=/nixos/trunk/; revision=33382
2012-03-23 13:37:22 +00:00
Eelco Dolstra
293e3a784d
* Ensure a consitent umask in the activation script (reported by
...
Lluís).
svn path=/nixos/trunk/; revision=33347
2012-03-22 10:17:10 +00:00
Eelco Dolstra
fcc2e985a2
* Handle jobs that fail while a post-start script is waiting for them.
...
svn path=/nixos/trunk/; revision=33269
2012-03-19 18:07:05 +00:00
Eelco Dolstra
b1fd71038e
* Slight speedup. It's amazing how quickly shell scripts become
...
slow: calling basename in a loop somewhere has a noticable impact on
performance. We really shouldn't use bash scripts.
svn path=/nixos/trunk/; revision=33242
2012-03-18 19:05:44 +00:00
Eelco Dolstra
8ca2aff772
* Get rid of some grep hackery on the Upstart jobs.
...
svn path=/nixos/trunk/; revision=33240
2012-03-18 18:53:50 +00:00
Eelco Dolstra
4acc48fc2d
* Mark tasks such as mount-failed as not to be restarted.
...
svn path=/nixos/trunk/; revision=33237
2012-03-18 18:04:49 +00:00
Eelco Dolstra
21393eed1e
* Use the --quiet flag.
...
svn path=/nixos/trunk/; revision=33225
2012-03-18 02:36:44 +00:00
Eelco Dolstra
86d8d62d16
* Allow Upstart jobs to declare that they shouldn't be restarted by
...
switch-to-configuration. E.g. the X server shouldn't be restarted
because that kills all the X clients.
svn path=/nixos/trunk/; revision=33223
2012-03-18 02:10:39 +00:00
Eelco Dolstra
3495a773f9
* Improved Upstart job handling in switch-to-configuration. It no
...
longer compares the current configuration to the previous
configuration, but instead compares the current Upstart state to the
intended state. Thus, if the switch script is interrupted, running
nixos-rebuild again will resume starting/stopping Upstart jobs where
the previous run left off.
We determine if an Upstart job has changed by having the pre-start
script of each Upstart job put a symlink to its .conf file in
/var/run/upstart-jobs. So if this symlink differs from the target
of /etc/init/<job>.conf, then the job has changed. This also
prevents multiple restarts of dependent jobs. E.g., if job B has
"start on started A" and "stop on stopping A", then restarting A
will cause B to be restarted, so B shouldn't B restarted a second
time.
We only start jobs that are not running if 1) they're tasks that
have been previously run (like mountall); or 2) they're jobs that
have a "start on" condition. This seems a reasonable heuristic.
svn path=/nixos/trunk/; revision=33222
2012-03-18 01:53:35 +00:00
Shea Levy
8ad872ca03
Revert r33139
...
I didn't end up needing it and there's a better way to do what I wanted if I
did.
svn path=/nixos/trunk/; revision=33150
2012-03-16 12:01:08 +00:00
Shea Levy
b89a65e54c
Allow multiple definitions of boot.loader.kernelFile as long as they are all the same
...
svn path=/nixos/trunk/; revision=33139
2012-03-16 03:20:12 +00:00
Shea Levy
001fcad421
First shot at EFI booting.
...
Note: This feature is INCOMPLETE. Moreover, when runEfibootmgr is true it will
MODIFY NVRAM and, on Apple systems, possibly brick your firmware. PLEASE be
careful while further testing is performed
svn path=/nixos/trunk/; revision=33047
2012-03-13 19:27:59 +00:00
Eelco Dolstra
b6d43e1aca
* Fix Amazon image generation (broken by r32913).
...
svn path=/nixos/trunk/; revision=33032
2012-03-13 13:17:43 +00:00