Commit graph

1841 commits

Author SHA1 Message Date
Eelco Dolstra dccd99b564 * Disable "nixos-gen-seccure-keys": it's not clear what it's for, it's
not documented, and it doesn't seem to be used anywhere.

svn path=/nixos/trunk/; revision=33732
2012-04-10 21:11:11 +00:00
Eelco Dolstra 907df082dc * Including the Nixpkgs revision made the ISO volume label slightly
too long.  So make it shorter.

svn path=/nixos/trunk/; revision=33731
2012-04-10 21:08:10 +00:00
Eelco Dolstra 096b7723c8 * Add a command "nixos-version" that prints the version of the
currently activated NixOS.  This is "0.1pre-svn" when built from a
  SVN tree, but contains the actual revision when installed from the
  NixOS channel or from the ISO.

svn path=/nixos/trunk/; revision=33730
2012-04-10 20:56:38 +00:00
Eelco Dolstra f9ac67c67f * Copying manifests is slightly tricky because
download-using-manifests expects that the files in
  /nix/var/nix/manifests are symlinks into the store.

svn path=/nixos/trunk/; revision=33727
2012-04-10 15:36:50 +00:00
Eelco Dolstra f37b453b19 * nixos-install: Ensure that builds are done by the nixbld users
rather than root.  Also copy all manifests into the chroot so that
  any nix-pull done outside the chroot is "inherited".

svn path=/nixos/trunk/; revision=33725
2012-04-10 14:39:12 +00:00
Eelco Dolstra f9e8e735bb * Remove debug line.
svn path=/nixos/trunk/; revision=33723
2012-04-10 13:28:48 +00:00
Eelco Dolstra 5c06c66b68 * Clear more locale-related variables in the installer.
svn path=/nixos/trunk/; revision=33722
2012-04-10 13:28:17 +00:00
Eelco Dolstra b2025c4687 * Use "umount -l" to clean up.
svn path=/nixos/trunk/; revision=33721
2012-04-10 13:25:55 +00:00
Eelco Dolstra 5409e76353 * Disable wicd in the installation CD for now, because it causes
dhcpcd to segfault randomly or give corrupt output.  See e.g.

    http://hydra.nixos.org/build/2380666/nixlog/1/raw

  The problem seems to be that wicd sends a "-k" command to dhcpcd to
  release the interface, which doesn't work well with a dhcpcd that
  handles all interfaces in one process.

svn path=/nixos/trunk/; revision=33720
2012-04-10 13:09:56 +00:00
Eelco Dolstra a7af5588b6 * Drop ugly reference to var/run/current-system/sw/sbin/wpa_cli, and
make it conditional.

svn path=/nixos/trunk/; revision=33717
2012-04-10 12:07:30 +00:00
Eelco Dolstra 83679c99b1 * Don't put /var and /nix on ephemeral storage if we're booting
from EBS.

svn path=/nixos/trunk/; revision=33716
2012-04-10 11:11:05 +00:00
Lluís Batlle i Rossell 849d136aa6 Making also the system-tarball-pc show the memtest entry as the
pkgs.memtest86.name.


svn path=/nixos/trunk/; revision=33693
2012-04-09 20:37:54 +00:00
Lluís Batlle i Rossell 9017ccf9fe Removing the special memtest.nix module for the isos, and using
the same as the usual nixos. I think this trivial change works;
I checked the grub.cfg output generated in the iso_minimal.


svn path=/nixos/trunk/; revision=33692
2012-04-09 20:36:26 +00:00
Lluís Batlle i Rossell 6e281e46b7 I update the name of the memtest entry in grub of the iso images,
because it can be overriden choosing another memtest86.

As an effect of a change in nixpgks, the isos will include
memtest86 4.0a instead of memtest86+ 4.20, only because the 
former is released later, and I deduce it should work better.


svn path=/nixos/trunk/; revision=33691
2012-04-09 20:30:14 +00:00
Lluís Batlle i Rossell 0b8b6616b6 Making the memtest name come from the pkgs.memtest86, as the nixos
user can override choosing between two memtests.


svn path=/nixos/trunk/; revision=33690
2012-04-09 20:08:14 +00:00
Rob Vermaas 6b34bd8564 remove remaining reference to nixos-deploy-nwtork
svn path=/nixos/trunk/; revision=33663
2012-04-07 15:18:39 +00:00
Eelco Dolstra 301c4d96b1 * Remove nixos-deploy-network. It has been superceded by Charon.
svn path=/nixos/trunk/; revision=33662
2012-04-07 13:26:35 +00:00
Eelco Dolstra 6e7859814c * Move misc/deployment.nix to Charon, since these options don't really
make sense outside of a Charon deployment.

svn path=/nixos/trunk/; revision=33661
2012-04-07 13:17:03 +00:00
Peter Simons ec3dca188c Dropped the unused/unknown/obsolete module i8042 from 'boot.initrd.kernelModules'.
svn path=/nixos/trunk/; revision=33654
2012-04-06 19:21:50 +00:00
Eelco Dolstra 4f4c529979 Stage 1 improvements:
* Load scsi_wait_scan after all other kernel modules to ensure that
  all SCSI device nodes have been created.
* Increase the timeout for the appearance of the root device to 20
  seconds.
* Do a "udevadm settle" just after the root device has appeared to
  make sure that udev isn't accessing the device anymore (hopefully).
  On EC2 (Xen), I've seen fsck on the root fail randomly with "device
  in use" errors.

svn path=/nixos/trunk/; revision=33650
2012-04-06 14:20:43 +00:00
Eelco Dolstra 1e8e83408b * Revert unintended commit.
svn path=/nixos/trunk/; revision=33646
2012-04-06 12:23:44 +00:00
Eelco Dolstra 852e513638 * Handle booting from /dev/xvda.
svn path=/nixos/trunk/; revision=33645
2012-04-06 12:23:12 +00:00
Eelco Dolstra e44b87dd31 * Pass --no-sessions to Upstart to make sure users cannot start
Upstart jobs (even when Upstart has attached to D-Bus).

svn path=/nixos/trunk/; revision=33617
2012-04-05 12:27:21 +00:00
Mathijs Kwik 9a91181be9 damn you shell syntax! :)
svn path=/nixos/trunk/; revision=33603
2012-04-05 08:20:43 +00:00
Lluís Batlle i Rossell 56d9e60bb7 Making bind start on started network-interfaces. It wasn't starting ever.
svn path=/nixos/trunk/; revision=33542
2012-04-02 18:28:42 +00:00
Lluís Batlle i Rossell fbd4f65652 Fixing the comment on the new grub/memtest.nix module.
svn path=/nixos/trunk/; revision=33540
2012-04-02 17:31:08 +00:00
Lluís Batlle i Rossell 9a6f2231b2 Adding a module for memtest86+, so if enabled, will appear in the grub menu.
To enable it:
boot.loader.grub.memtest86 = true;


svn path=/nixos/trunk/; revision=33539
2012-04-02 17:19:21 +00:00
Mathijs Kwik a1e86494d0 made challenge-response authentication method configurable for openssh
challenge-response is an authentication method that does not need the
plain text password to be emitted over the (encrypted) connection.
This is nice if you don't fully trust the server.

It is enabled (upstream) by default.

To the end user, it still looks like normal password authentication,
but instead of sending it, it is used to hash some challenge.

This means that if you don't want passwords to be used ever at all,
and just stick to public key authentication, you probably want to
disable this option too.

svn path=/nixos/trunk/; revision=33513
2012-04-01 10:54:17 +00:00
Mathijs Kwik e216ce07df dhcpcd: ip-up and ip-down emit more info (like wifi access point)
useful to only start certain services (like vpn) on certain networks

svn path=/nixos/trunk/; revision=33512
2012-04-01 10:54:15 +00:00
Mathijs Kwik 7d4fd69b5f dhcpcd: wifi disconnect should also generate ip-down
svn path=/nixos/trunk/; revision=33511
2012-04-01 10:54:13 +00:00
Mathijs Kwik 7ba690add6 optionally allow normal users to control wpa_supplicant through
wpa_gui or wpa_cli.

Comes with a default wpa_supplicant.conf, which gets updated through
aforementioned utilities.

svn path=/nixos/trunk/; revision=33510
2012-04-01 10:54:10 +00:00
Mathijs Kwik 7f84957ff2 mongodb: allow running as a replicaset member
also useful for point-in time backups using mongodump --oplog

svn path=/nixos/trunk/; revision=33509
2012-04-01 10:54:08 +00:00
Mathijs Kwik de5b437004 assertions '.msg' doesn't exist => .message
svn path=/nixos/trunk/; revision=33508
2012-04-01 10:54:06 +00:00
Joachim Schiele bc6ca7944f fixed a upstart issue where upsd was never started
svn path=/nixos/trunk/; revision=33494
2012-03-31 11:39:30 +00:00
Lluís Batlle i Rossell f4883572d8 Making the init interactive shells handle well console kernel parameters
with extra parameters, like console=ttyS0,115200.


svn path=/nixos/trunk/; revision=33458
2012-03-28 19:58:44 +00:00
Eelco Dolstra 1d3c7e2a2d * Added a ‘deployment.ec2.tags’ option.
svn path=/nixos/trunk/; revision=33449
2012-03-28 13:02:55 +00:00
Joachim Schiele f4d26eb446 added example for GRUB 2
svn path=/nixos/trunk/; revision=33448
2012-03-28 10:34:40 +00:00
Eelco Dolstra 040042b8a5 * Blackhole the address 169.254.169.254 after we've obtained the user
data to prevent non-root processes from getting the private host
  key.

svn path=/nixos/trunk/; revision=33442
2012-03-27 14:51:08 +00:00
Eelco Dolstra 64241a3e90 * Flush nscd when switching to a new configuration.
svn path=/nixos/trunk/; revision=33441
2012-03-27 14:35:45 +00:00
Eelco Dolstra da6046ef6b * Fix the generation of resolvconf.conf.
svn path=/nixos/trunk/; revision=33435
2012-03-26 22:14:47 +00:00
Lluís Batlle i Rossell e9d641014d Not everyone runs nscd. Fixing a boot problem for those who don't.
svn path=/nixos/trunk/; revision=33434
2012-03-26 21:01:46 +00:00
Mathijs Kwik f31fefdfd9 splitted ssh/sshd X11 forwarding logic. Backward compatible change.
You can now set the forwardX11 config option for the ssh client and server separately.

For server, the option means "allow clients to request X11 forwarding".
For client, the option means "request X11 forwarding by default on all connections".

I don't think it made sense to couple them. I might not even run the server on some machines.
Also, I ssh to a lot of machines, and rarely want X11 forwarding. The times I want it,
I use the -X/-Y option, or set it in my ~/.ssh/config.

I also decoupled the 'XAuthLocation' logic from forwardX11.
For my case where ssh client doesn't want forwarding by default, it still wants to set the path for the cases I do need it.

As this flag is the one that pulls in X11 dependencies, I changed the minimal profile and the no-x-libs config to check that instead now.

svn path=/nixos/trunk/; revision=33407
2012-03-25 15:42:05 +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 70e1958bb6 * New 64-bit AMIs.
svn path=/nixos/trunk/; revision=33390
2012-03-23 21:22:58 +00:00
Eelco Dolstra 326891443c * dhcpcd: Don't use the "persistent" option. With it, dhcpcd won't
delete routes and addresses when it quits.  This causes those routes
  and addresses to stick around forever, since dhcpcd won't delete
  them when it runs next (even if it acquires a new lease on the same
  interface).  This is bad; in particular the stale (default) routes
  can break networking.

  The downside to removing "persistent" is that you should never ever
  do "stop dhcpcd" on a remote machine configured by dhcpcd.

svn path=/nixos/trunk/; revision=33388
2012-03-23 21:00:32 +00:00
Eelco Dolstra 3d87c27c6d svn path=/nixos/trunk/; revision=33383 2012-03-23 14:23:19 +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 1949a85987 * Do a sync before switching to a new configuration.
svn path=/nixos/trunk/; revision=33381
2012-03-23 12:29:11 +00:00
Eelco Dolstra 7c75b046ea * Fix the permissions on /dev/vboxuser in VirtualBox guests.
svn path=/nixos/trunk/; revision=33372
2012-03-23 11:52:06 +00:00
Eelco Dolstra b46e911012 * Fix some references to dhclient.
svn path=/nixos/trunk/; revision=33359
2012-03-22 13:02:42 +00:00
Eelco Dolstra 4ae7819c39 * The idmapd job requires the sunrpc kernel module to be loaded.
(http://hydra.nixos.org/build/2315397)

svn path=/nixos/trunk/; revision=33358
2012-03-22 13:01:06 +00:00
Rob Vermaas a525074f43 increase size of virtualbox image
svn path=/nixos/trunk/; revision=33357
2012-03-22 12:58:45 +00:00
Eelco Dolstra 2a135eb4d4 * Remove the ‘services.nfs.client.enable’ flag; use
‘boot.supportedFilesystems = [ "nfs" ]’ if needed.

svn path=/nixos/trunk/; revision=33356
2012-03-22 12:24:23 +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 89a21f7a7d * GIDs are supposed to match UIDs.
svn path=/nixos/trunk/; revision=33346
2012-03-22 10:11:15 +00:00
Lluís Batlle i Rossell 5ddae4a83a Changing portmap by rpcbind on nfs services.
That could make rpc.statd work.

Patch by Rickard Nilsson.

I'm not sure we need that netconfig file in etc.


svn path=/nixos/trunk/; revision=33342
2012-03-21 20:37:37 +00:00
Eelco Dolstra a4a355f764 * Make dhcpcd the default DHCP client.
svn path=/nixos/trunk/; revision=33339
2012-03-21 17:49:54 +00:00
Eelco Dolstra d12339b282 * Doh.
svn path=/nixos/trunk/; revision=33332
2012-03-21 12:38:11 +00:00
Eelco Dolstra 8884d445b7 * VirtualBox: create a vboxnet0 interface by default.
svn path=/nixos/trunk/; revision=33331
2012-03-21 12:28:14 +00:00
Lluís Batlle i Rossell 20edb255bd Adding idmapd, for NFSv4.
Patch by Rickard Nilsson.

This may fix rpc.statd start.


svn path=/nixos/trunk/; revision=33330
2012-03-21 11:58:06 +00:00
Shea Levy 7a9a33e90d efi-boot-stub: Give startup.sh files more descriptive names
svn path=/nixos/trunk/; revision=33321
2012-03-21 02:05:52 +00:00
Eelco Dolstra 6f03065dce * Move the setting of $MODULE_DIR to modprobe.nix.
* Add a slash to the end of $MODULE_DIR, as expected by depmod.  (Not
  that running depmod from the command line is all that useful, since
  you can't use it to update the tree in the Nix store.  But at least
  commands like "depmod -n" work now.)  Reported by Kirill Elagin on
  IRC.

svn path=/nixos/trunk/; revision=33312
2012-03-20 22:02:27 +00:00
Lluís Batlle i Rossell 6af26254ad Adding xfs support at supportedFilesystems
svn path=/nixos/trunk/; revision=33311
2012-03-20 22:00:32 +00:00
Eelco Dolstra e86427f037 * Remove an obsolete line.
svn path=/nixos/trunk/; revision=33308
2012-03-20 21:43:13 +00:00
Shea Levy 70eb64c025 Pommed: find the 'eject' command in /var/setuid-wrappers:/home/shlevy/.nix-profile/bin:/home/shlevy/.nix-profile/sbin:/home/shlevy/.nix-profile/lib/kde4/libexec:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/nix/var/nix/profiles/default/lib/kde4/libexec:/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin:/var/run/current-system/sw/lib/kde4/libexec
svn path=/nixos/trunk/; revision=33302
2012-03-20 18:28:32 +00:00
Eelco Dolstra 010578d8a4 * Restrict VirtualBox to users in the vboxusers group.
The VirtualBox build in Nixpkgs is insecure because it uses the
  "--disable-hardened" flag, which disables some checks in the
  VirtualBox kernel module.  Since getting rid of that flag looks like
  too much work, it's better to ensure that only explicitly permitted
  users have access to VirtualBox.

* Drop the 666 permission on "sonypi" because it's not clear why that
  device should be world-writable.

svn path=/nixos/trunk/; revision=33301
2012-03-20 16:30:43 +00:00
Shea Levy 11066067f7 Add nouveau xorg video driver
svn path=/nixos/trunk/; revision=33300
2012-03-20 16:29:22 +00:00
Eelco Dolstra d9e28560d1 * Emit "expect daemon" for the mountall task. Otherwise it may get a
USR1 signal before it has forked into the background (because it
  will be in the start/running state immediately).

svn path=/nixos/trunk/; revision=33288
2012-03-20 10:17:08 +00:00
Shea Levy 0d67d95f32 Add a module for the pommed tool for Apple laptop keyboards.
svn path=/nixos/trunk/; revision=33286
2012-03-20 04:41:13 +00:00
Shea Levy 6435207dd1 Whoops, actually use the mtrack fork
svn path=/nixos/trunk/; revision=33285
2012-03-20 01:56:39 +00:00
Shea Levy 724b5abe42 xf86-input-multitouch seems to be abandoned, update it with the mtrack fork
svn path=/nixos/trunk/; revision=33283
2012-03-20 01:48:09 +00:00
Shea Levy 14dd95b692 xserver.nix: Automatically support xorg's own video drivers
svn path=/nixos/trunk/; revision=33281
2012-03-19 23:57:26 +00:00
Eelco Dolstra 6093b54b73 * Zabbix: use the path attribute.
svn path=/nixos/trunk/; revision=33278
2012-03-19 19:43:31 +00:00
Eelco Dolstra a51a83bd8c * Drop obsolete line.
svn path=/nixos/trunk/; revision=33276
2012-03-19 19:34:06 +00:00
Eelco Dolstra 533448ae37 * udev: don't set the STARTUP flag anymore, since LVM no longer uses
it.
* Don't call "vgscan" anymore; VG scans are supposed to be automatic.

svn path=/nixos/trunk/; revision=33275
2012-03-19 19:10:27 +00:00
Lluís Batlle i Rossell 81655b7247 Have a more featured initrd and crashDump for the pc system tarball.
svn path=/nixos/trunk/; revision=33274
2012-03-19 19:01:52 +00:00
Eelco Dolstra f546837cdf * Don't use replaceChars. It's slow.
svn path=/nixos/trunk/; revision=33270
2012-03-19 18:07:28 +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 31c93522d5 * Support PostgreSQL versions >= 8.4, which have a slightly different
pg_hba.conf format.

svn path=/nixos/trunk/; revision=33268
2012-03-19 18:06:18 +00:00
Shea Levy fac0fef5d8 Whoops
svn path=/nixos/trunk/; revision=33264
2012-03-19 17:25:50 +00:00
Shea Levy 842239f5af all-hardware.nix: Apple users may want to be able to type something at a debug2 prompt
svn path=/nixos/trunk/; revision=33263
2012-03-19 17:23:24 +00:00
Eelco Dolstra f12950b8e0 * Improve the Postgres Upstart job: don't use pg_ctl, let Upstart
monitor the postgres process directly (so that it can be restarted
  if necessary), let Upstart send SIGTERM to postgres to shut it down
  gracefully.  Also drop the Mediawiki references.

svn path=/nixos/trunk/; revision=33262
2012-03-19 16:49:13 +00:00
Eelco Dolstra ebc6d7f435 * Attempt to fix the random "udevadm settle - timeout of 120 seconds
reached, the event queue contains: /sys/devices/virtual/tty/hvc1" VM
  failures.

svn path=/nixos/trunk/; revision=33259
2012-03-19 15:10:39 +00:00
Eelco Dolstra dde8453a09 * Initialise $LOCALE_ARCHIVE earlier in /etc/profile to prevent the
warning

    -bash: warning: setlocale: LC_TIME: cannot change locale (en_GB.UTF8): No such file or directory

  when $LC_TIME is set in environment.shellInit.

svn path=/nixos/trunk/; revision=33248
2012-03-19 02:53:58 +00:00
Eelco Dolstra bcbe2dce4c * Don't source /etc/profile in interactive non-login shells, unless it
wasn't sourced in a parent shell (as determined by the environment
  variable __ETC_PROFILE_DONE).  This prevents overriden values of
  environment variables such as $PATH from being clobbered in
  subshells.
* Move all aliases to /etc/bashrc (since those are for interactive
  use).

svn path=/nixos/trunk/; revision=33246
2012-03-19 02:35:17 +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
Shea Levy 53580d514a You cant modprobe efivars from within the chroot, so modprobe efivars when booting an efi-compatible install CD
svn path=/nixos/trunk/; revision=33241
2012-03-18 18:55:47 +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 9ba5f09e44 * More tasks that shouldn't be restarted (though they're harmless).
svn path=/nixos/trunk/; revision=33238
2012-03-18 18:09:17 +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 362d1389d3 * mountall: make the "console output" Upstart stanza do its work. We
were redirecting output to /var/log/upstart/<job>, so it didn't work
  properly.
* mountall-ip-up: send the USR1 signal to the mountall process by
  looking up its PID, rather than doing "pkill -USR1 mountall".  This
  prevents a very subtle race condition where USR1 is delivered to a
  child process of mountall (such as fsck), if pkill sees the child
  just before its execve().  There is actually still a race condition
  because mountall installs its USR1 handler *after* daemonising, so
  mountall-ip-up could accidentally kill mountall.  Should report this
  to upstream.

svn path=/nixos/trunk/; revision=33236
2012-03-18 17:48:19 +00:00
Shea Levy b82c253b24 Add a kernel patch for the efi boot stub to read a config file when booted without arguments, and base removable media booting off of that patch
The patch is currently being discussed on LKML and hopefully will be included
in mainline in some form in the future. Note that booting from the livecd has
to do a lot of work before anything is output to the console, so if the drive
is still busy don't assume the boot has hanged

svn path=/nixos/trunk/; revision=33235
2012-03-18 17:14:52 +00:00
Eelco Dolstra 2cc8d0363e * Move the implementation of boot.kernelModules to udev's postStart.
It needs udevd to be running because the modules may require
  firmware.  Thanks to Mathijs and Arie for pointing this out.

svn path=/nixos/trunk/; revision=33234
2012-03-18 14:03:42 +00:00
Lluís Batlle i Rossell b78ac9e108 Fixing the mkOverride for the kernelPackages in crashdump (I misunderstood
mkOverride in the prev commit).

Adding an option on kernelParams for the postcrash kernel.


svn path=/nixos/trunk/; revision=33230
2012-03-18 10:02:58 +00:00
Mathijs Kwik c5a8d53d95 fixed intel microcode loading during boot
svn path=/nixos/trunk/; revision=33226
2012-03-18 08:10:32 +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 83f5d26a85 * Ignore the "No soundcards found" error.
svn path=/nixos/trunk/; revision=33224
2012-03-18 02:36:21 +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
Eelco Dolstra 5a98d6d514 * mountall: Don't start the emergency shell if the X server is
running.  The user won't see it, and the "console owner" stanza
  breaks VT switching and causes the X server to go to 100% CPU time.

svn path=/nixos/trunk/; revision=33221
2012-03-18 01:44:20 +00:00