Download raw body.
Allow autoinstall response file to select default answer
Alexander Hall <alexander@beard.se> wrote: > On October 6, 2026 4:52:00 PM GMT+02:00, Theo de Raadt <deraadt@openbsd.org> wrote: > > /.../ > > >Imagine if everytime a question matches, and the answer is used, then that > >one is removed from the list. > > > >Therefore the next time the question is asked, it would use a new record. > > It's been a while, but I'm pretty sure that's what's already implemented. That is exactly what it does, the while loop seen in the patch is where that logic is implemented. I'm not changing the logic, my change is only to allow a blank answer (_val) to be valid and a blank to accept the default. Currently a record with a blank value is treated the same as a comment, skipped. autoinstall(8) does not explain it but the email received after install titled "install response file" shows this logic (when duplicate questions were asked). "Here's the question, here's the answer" duplicates are not treated differently. The only way to accept the default is to leave the question out of the response file, this is documented in autoinstall(9). How do you do provide an answer only to the second time a question is asked? See my example of "Pathname to the sets" earlier. My mistake was thinking everyone knew how answer files worked in handling duplicate questions and the way answer files are parsed being able to answer each separately. Oh... that explains why the installer rephrases the passkey question for root and user, it's more common to give the user a passkey but not root, it couldn't be done if the passkey question was the same. Don't worry I know it's for security to ensure the passkey can only go to the intended account. I can see how not knowing how response files are parsed makes my suggestion so confusing. Does this change need to be documented? Hasn't the user already been told an empty response to a question means to use the default? Works for interactive install why not make it also work for autoinstall. On 2026-10-06 16:54:22, Stuart wrote: > and space is *seriously* limited in some install media). I was trying to think of a way to shorten my "if" statement but what I presented best shows what I'm doing, replacing "return" with an if to return or break. Maybe comment lines could be stripped from scripts copied to limited space media. stripcom() is defined in many places. Only a suggestion (probably a bad one).
Allow autoinstall response file to select default answer