[Nix-dev] Re: [Nix-commits] SVN commit: nix - 19009 - MarcWeber - in nixos/trunk/modules: . installer installer/init-script system/activation

Eelco Dolstra e.dolstra at tudelft.nl
Thu Dec 17 13:07:52 CET 2009


Hi,

Marc Weber wrote:

> module creating /sbin/init

This is useful, thanks :-)  However, there are some things I don't understand.
If it just creates a symlink to the current generation of the system profile, I
smell some overengineering...

> +target="/sbin/init"
> +targetOther="/boot/init-other-configurations-contents.txt"

What is the point of "/boot/init-other-configurations-contents.txt"?  (And I
can't really parse such file names...)

> +configurationCounter=0

The variable $configurationCounter seems to be unused.

> +numAlienEntries=`cat <<EOF | egrep '^[[:space:]]*title' | wc -l

Idem for numAlienEntries.

> + at extraEntries@

There is no extraEntries argument passed to the substituter.

> +# Add all generations of the system profile to the menu, in reverse
> +# (most recent to least recent) order.

This talks about a menu, but there is only one configuration accessible through
/sbin/init, right?

> +      enable = mkOption {
> +        default = true;
> +        description = ''
> +          Some systems require a /sbin/init script which is started.
> +          Or having it makes starting NixOS easier.
> +          This applies to some kind of hosting services and user mode linux.
> +
> +          Additionaly this script will create
> +          /boot/init-other-configurations-contents.txt containing
> +          contents of remaining configurations. You can copy paste them into
> +          /sbin/init manually running a recue system or such.

This description doesn't really say what the option *does*, and is kind of vague
about the why.  (I.e. if it "makes starting NixOS easier", then you'd always
want this, right?)  A better description might be something like

  Create a script <filename>/sbin/init</filename> that starts the default NixOS
configuration.  This is required in certain hosting environments that do not
support booting through NixOS' GRUB menu, but instead mount the root filesystem
directly and start <filename>/sbin/init</filename>. [...]

Also, please keep in mind that configuration descriptions end up in the manual
and the configuration.nix(5) manpage.  So they should be relatively free of
typos and ungrammatical sentences.

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



More information about the nix-dev mailing list