Debian preseed

As I told in a previous article, preseeding is very useful, you can do many stuff without the need of an external system like Puppet o Chef.

A problem I encountered while preseeding our farm, was to ask user just some input or to confirm it.

The solution is very simple but not well documented and after a bit of research, I found the way.

# preseeding the value, this will not be asked.
d-i netcfg/get_nameservers string 192.168.30.102 192.168.30.103

# applying the `seen false` attribute, will prompt during the install with the value as setted before.
d-i netcfg/get_nameservers seen false  

This can be used for any other field, here's another example

d-i netcfg/get_hostname string changeme  
d-i netcfg/get_hostname seen false  
d-i netcfg/get_domain string brugnara.me  
d-i netcfg/get_domain seen false