Commit graph

62 commits

Author SHA1 Message Date
Eelco Dolstra a9e8bf6491 * nfsd: run rpc.nfsd from the pre-start script since it's not actually
a daemon (it just starts some kernel threads).  In the post-stop
  script, stop the kernel threads.
* exportfs: fix the createMountPoints option.
* Mount the nfsd filesystem on /proc/fs/nfsd because mountd prefers
  this.

svn path=/nixos/branches/boot-order/; revision=22187
2010-06-08 16:01:31 +00:00
Eelco Dolstra 6290788247 * If mountall fails to mount all filesystems, start an emergency shell
to allow the user to fix or ignore the problem.

svn path=/nixos/branches/boot-order/; revision=22165
2010-06-07 12:15:55 +00:00
Eelco Dolstra 5702557a65 * Put e2fsprogs etc. in mountall's $PATH so that fsck works.
svn path=/nixos/branches/boot-order/; revision=22151
2010-06-04 15:35:32 +00:00
Eelco Dolstra dbadf6e9c2 * Use mountall to mount all filesystems and activate all swap devices
during boot.  Mountall ensures that these are done in the right
  order.  It's informed by udev about devices becoming available.  It
  emits some Upstart events upon reaching certain states, in
  particular ‘local-filesystems’ after all local filesystems have been
  mounted successfully, ‘remote-filesystems’ after all network
  filesystems have been mounted, and ‘filesystem’ (sic) when all
  filesystems have been mounted.

  Currently, if a filesystem fails to mount or doesn't exist, then the
  mingettys won't start and the boot will appear to hang.  This is
  because mountall doesn't emit an event for failing filesystems and
  waits indefinitely for the filesystems to become available.

* The ‘filesystems’ and ‘swap’ Upstart jobs are gone.  (Support for
  encrypted swap devices is temporarily gone.)
  
* Generate a proper /etc/fstab from the ‘fileSystems’ and
  ‘swapDevices’ options.

svn path=/nixos/branches/boot-order/; revision=22148
2010-06-04 14:22:11 +00:00
Eelco Dolstra 5316059442 * Revert an unintended commit.
svn path=/nixos/trunk/; revision=22145
2010-06-04 14:00:56 +00:00
Eelco Dolstra 7f41d2bb86 svn path=/nixos/trunk/; revision=22126 2010-06-03 14:32:23 +00:00
Eelco Dolstra c089738bdc * Use the shadow' package instead of pwdutils', `pam_login' and
`su'.
* The `usermod' from `shadow' allows setting a supplementary group
  equal to the user's primary group, so the special hack for the
  `nixbld' group is no longer needed.
* Removed /etc/default/passwd since it's not used by the new passwd.
  The hash is configured in pam_unix.
* Move some values for `security.setuidPrograms' and
  `security.pam.services' to the appropriate modules.

svn path=/nixos/trunk/; revision=22107
2010-06-02 21:10:48 +00:00
Eelco Dolstra 8519e72ccc * Don't stop tty-backgrounds during shutdown.
svn path=/nixos/trunk/; revision=22100
2010-06-02 16:04:30 +00:00
Eelco Dolstra 95a9c5dd77 * Log the standard output/error of Upstart jobs to
/var/log/upstart/<jobname> rather than spamming the console with it.

svn path=/nixos/trunk/; revision=22093
2010-06-01 19:44:23 +00:00
Eelco Dolstra e450e4551f * tty-backgrounds: don't do a setcfg action on the console if the
current theme is the same.  This prevents the console from being
  blanked during boot.

svn path=/nixos/trunk/; revision=22092
2010-06-01 18:30:17 +00:00
Eelco Dolstra fa183e5472 * Expose networking.interfaces as an attribute set keyed on the
interface name through the derived option networking.ifaces.  This
  makes it easier to get information about specific interfaces
  (e.g. `nodes.router.config.networking.ifaces.eth2.ipAddress').
  Really networking.interfaces should be an attribute set.

svn path=/nixos/trunk/; revision=21938
2010-05-21 14:12:03 +00:00
Eelco Dolstra 7484774172 * Activate software RAID devices from udev. This makes the swraid
Upstart jobs unnecessary.
* Support having the root filesystem on swraid.

svn path=/nixos/trunk/; revision=21807
2010-05-16 20:40:04 +00:00
Nicolas Pierron 1f2db38e9a Fix swraid for config which do not have any raid devices.
svn path=/nixos/trunk/; revision=21800
2010-05-16 16:36:01 +00:00
Nicolas Pierron 43fcf8a2b2 Fix swraid device detection on boot.
svn path=/nixos/trunk/; revision=21661
2010-05-08 17:18:16 +00:00
Eelco Dolstra 8874226fa3 * Add rfkill to the system path.
svn path=/nixos/trunk/; revision=21201
2010-04-21 11:37:52 +00:00
Eelco Dolstra 6c16ff29a5 * Don't do "kbd_mode -u" because it kicks the X server out of raw
mode, and isn't needed anyway.

svn path=/nixos/trunk/; revision=21182
2010-04-20 14:35:12 +00:00
Eelco Dolstra 442093d27d * grep returns a non-zero exit code if no line matches, causing the
swap task to fail.  So ignore that.

svn path=/nixos/trunk/; revision=19660
2010-01-26 09:56:53 +00:00
Lluís Batlle i Rossell 8d5037ad62 network-interfaces and emitting ip-up: I was still learning boolean logic.
svn path=/nixos/trunk/; revision=19464
2010-01-15 11:20:57 +00:00
Eelco Dolstra f89e46bc12 * Revert r19339 because it doesn't work and gives a lot of errors:
client# /dev/fd/9: line 13: -q: command not found
client# /dev/fd/9: line 18: test: -neq: binary operator expected
client# mdadm: No arrays found in config file

svn path=/nixos/trunk/; revision=19386
2010-01-13 10:37:58 +00:00
Lluís Batlle i Rossell b5ade01199 Make network-interfaces emit the ip-up if there are interfaces defined *OR*
there are localCommands (which potentially can bring up interfaces).


svn path=/nixos/trunk/; revision=19371
2010-01-12 11:08:27 +00:00
Eelco Dolstra eccddb67fa * --mknodes is no longer needed (in fact it might interfere with
udev).

svn path=/nixos/trunk/; revision=19340
2010-01-10 20:07:23 +00:00
Nicolas Pierron b02cf8d20e Check that 'mdadm --assemble' is effective before continuing.
svn path=/nixos/trunk/; revision=19339
2010-01-10 19:36:53 +00:00
Eelco Dolstra cac502e35b * Okay, so we do need an "lvm" task to run vgscan/vgchange. It's only
needed though for devices that were not already found and activated
  in the initrd.

svn path=/nixos/trunk/; revision=19337
2010-01-10 19:14:42 +00:00
Eelco Dolstra cf06d2b9cf * Don't start the filesystems task on a startup event. It's pointless
to do so until udev has created device nodes.

svn path=/nixos/trunk/; revision=19332
2010-01-10 18:23:13 +00:00
Eelco Dolstra 6f8a3ba7c7 * Create devicemapper/lvm device nodes from udev (using the rules
supplied by the lvm package).  This makes the "lvm" Upstart task
  unnecessary.  Also, we now get /dev/disk/by-{label,uuid} symlinks
  for LVM logical disks.

svn path=/nixos/trunk/; revision=19300
2010-01-07 22:39:35 +00:00
Eelco Dolstra 0595b7f89d * devicemapper -> lvm2.
svn path=/nixos/trunk/; revision=19294
2010-01-07 16:14:50 +00:00
Eelco Dolstra 9a0789a81e * Add devicemapper to the system path.
svn path=/nixos/trunk/; revision=19292
2010-01-07 15:55:05 +00:00
Eelco Dolstra ed7d096624 * Resolve $device (e.g. from /dev/disk/by-label/foo -> /dev/sda2),
because /proc/swaps contains resolved paths as well.  Without this,
  the swap device will be turned off again by the $unused code.

svn path=/nixos/trunk/; revision=19278
2010-01-06 22:41:59 +00:00
Nicolas Pierron 81d621b4f7 * Replace blowfish by AES, since recent CPU could have optimisation for it.
* Miss-interpretation of the --skip option of cryptsetup.  Ciphered partition labels are not supported.  Labels are erased when doing mkswap on the ciphered partition.
* Avoid doing swapon on devices which are already listed in /proc/swaps.
* Remove no longer listed devices with only one swapoff command.

svn path=/nixos/trunk/; revision=19164
2009-12-31 13:56:47 +00:00
Sander van der Burg df21f0f06d Made a small fix because I kept receiving errors about: diff command not found. It also makes my system horribly slow.
svn path=/nixos/trunk/; revision=19148
2009-12-29 21:23:22 +00:00
Nicolas Pierron 4cf78fdb77 * Use postStart instead of preStart.
* Assemble devices only if there is a new entry.
* Add 'new-raid-array' flag to assemble new arrays.
* Emit new-devices flag to triggers the 'filesystems' task.

svn path=/nixos/trunk/; revision=19145
2009-12-29 14:10:05 +00:00
Nicolas Pierron e70214c853 Remove loop of new-device messages. Add a shell script to watch new devices.
svn path=/nixos/trunk/; revision=19142
2009-12-29 10:04:54 +00:00
Nicolas Pierron 246dae96fe Add an option to cipher swap partitions.
! Not tested yet: cryptsetup depends on a missing
! udev binary.

svn path=/nixos/trunk/; revision=19131
2009-12-26 16:20:00 +00:00
Eelco Dolstra d545d08461 * In the network-interfaces task, emit an ip-up event if there is a
statically configured interface (i.e. we're not running dhclient).
  Otherwise the ntpd job won't be triggered.
* Use the "-n" flag of "initctl emit" to send the event
  asynchronously.

svn path=/nixos/branches/upstart-0.6/; revision=18227
2009-11-06 21:38:40 +00:00
Eelco Dolstra 676da4d87d * Updated some more jobs.
svn path=/nixos/branches/upstart-0.6/; revision=18219
2009-11-06 19:20:09 +00:00
Eelco Dolstra 9fa2f12cc2 * Do some more jobs.
svn path=/nixos/branches/upstart-0.6/; revision=18212
2009-11-06 15:46:56 +00:00
Eelco Dolstra 7011a9315f * Use Upstart 0.6. Jobs are now in /etc/init instead of /etc/event.d.
svn path=/nixos/branches/upstart-0.6/; revision=18192
2009-11-06 10:43:38 +00:00
Eelco Dolstra b86e8208d5 * Doh! The mount options weren't passed properly.
svn path=/nixos/trunk/; revision=18047
2009-10-30 08:49:35 +00:00
Nicolas Pierron c195493a32 * Add a hacky for-loop to fix the usage of the continue keyword. (NIXOS-85)
The continue keyword was previously used to mount the next device, but
  the loop in has been removed. (see r17919)

svn path=/nixos/trunk/; revision=17973
2009-10-27 10:45:18 +00:00
Eelco Dolstra 1e1ae9cd1e * Don't squeeze all the filesystem option values into one environment
variable, since they might get confused (NIXOS-84).

svn path=/nixos/trunk/; revision=17919
2009-10-22 07:46:30 +00:00
Eelco Dolstra eba8f94069 * jobAttrs -> jobs.
svn path=/nixos/trunk/; revision=17769
2009-10-12 18:09:34 +00:00
Eelco Dolstra d982f23f20 * Convert the remaining jobs to jobAttrs style.
svn path=/nixos/trunk/; revision=17764
2009-10-12 17:27:57 +00:00
Eelco Dolstra e91d882a94 * Converted modules that were still using the old (concrete syntax)
style of declaring Upstart jobs.  While at it, converted them to the
  current NixOS module style and improved some option descriptions.
  Hopefully I didn't break too much :-)

svn path=/nixos/trunk/; revision=17761
2009-10-12 16:36:19 +00:00
Eelco Dolstra fdab662659 * Add iproute to the system path. It was a dependency of dhclient
already anyway.

svn path=/nixos/trunk/; revision=17512
2009-09-29 15:43:52 +00:00
Eelco Dolstra 684eb63658 * fsck is no longer in e2fsprogs.
* Don't try to remount CIFS filesystems.
* For devices specified by label, use /dev/disk/by-label instead of
  LABEL=.  The initrd already did this.
* Improved the flagging of pseudo devices.

svn path=/nixos/trunk/; revision=17431
2009-09-25 22:38:37 +00:00
Eelco Dolstra 38898d5304 * r17391 changed the mingetty ttys to device names instead of tty
numbers.  This also requires kbd and tty-backgrounds to be updated
  (and by extension syslogd and rogue).  Also updated the style of
  those modules.

svn path=/nixos/trunk/; revision=17424
2009-09-25 19:55:08 +00:00
Eelco Dolstra 39d1b11ff7 * The mount hack is gone, just use the regular mount from
util-linux-ng and make sure that the needed mount helpers
  (e.g. ntfs3g) are in /var/lib/current-system/sw/sbin.

svn path=/nixos/trunk/; revision=16690
2009-08-11 21:10:33 +00:00
Eelco Dolstra b58682401e * Give a type to networking.interfaces.
* Simplified the pre-start script of the network-interfaces module.
* Removed wireless support from the network-interfaces module.  It
  only worked for static WEP configurations anyway, and AFAIK nobody
  used it.

svn path=/nixos/branches/modular-nixos/; revision=16406
2009-07-16 17:18:54 +00:00
Eelco Dolstra 6119c399d8 * Support tasks in the new Upstart formalism.
* Swap task: fixed removing disabled swap devices.
* Swap task: specified the type of swapDevices.

svn path=/nixos/branches/modular-nixos/; revision=16396
2009-07-16 14:51:49 +00:00
Eelco Dolstra bb292fdf04 * Support post-stop actions.
svn path=/nixos/branches/modular-nixos/; revision=16393
2009-07-16 13:46:49 +00:00