[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17946 - raskin - in nixos/trunk/modules/system: activation boot etc

Eelco Dolstra e.dolstra at tudelft.nl
Thu Oct 29 21:31:01 CET 2009


Hi,

Michael Raskin wrote:

> Modified:
>    nixos/trunk/modules/system/activation/activation-script.nix
>    nixos/trunk/modules/system/activation/top-level.nix
>    nixos/trunk/modules/system/boot/stage-2-init.sh
>    nixos/trunk/modules/system/etc/etc.nix
>    nixos/trunk/modules/system/etc/make-etc.sh
> 
> Log:
> Some boot optimisations attempted. My system boots a few times faster now, and I cannot see how these can break things.

I just rebooted and this broke my system - the udev job couldn't modprobe any
kernel modules because /etc/event.d/udev was still pointing at the old udev job
in the store, which in turn referred to an older kernel.  So the check logic
isn't foolproof.

Further, *generating two C programs to update /etc* seems absolute overkill, and
doesn't improve the maintainability of the code.  (I never really noticed the
/etc update being a major bottleneck...)  Since the main overhead is probably in
forking, using a bit of Perl seems a simpler solution.

> +      stat /nix/store/ | \
> +        egrep \
> +	  'Access: [(]1775/[-drwxt]*[)] *Uid: [(][0-9 ]*/ *root[)] *Gid: [(][0-9 ]*/ *nixbld[)]' \
> +	  > /dev/null || {

What does this do?

> +echo "symlink(\"$out/bin/kill-etc\",\"/etc/kill-etc\");" >> fill-etc.c
> +echo "unlink(\"/etc/kill-etc\");" >> kill-etc.c

What is kill-etc supposed to do?

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list