From: Klemens Nanni Subject: Re: Allow autoinstall response file to select default answer To: tech@openbsd.org, obsd@mulh.net Date: Mon, 05 Oct 2026 06:15:27 +0000 5 октября 2026 г. 03:19:56 GMT+03:00, obsd@mulh.net пишет: >install.sub currently ignores "key=" (no value part) lines in the >response file. Make it so a blank value selects the default answer. How does this behave for questions without default where non-empty values are required? >This would allow for example: > Location of sets = cd > Pathname to the sets = >RCS file: /cvs/src/distrib/miniroot/install.sub,v >diff -u -p -u -r1.1292 install.sub >--- install.sub 19 Sep 2026 19:52:10 -0000 1.1292 >+++ install.sub 4 Oct 2026 22:55:49 -0000 >@@ -740,11 +740,16 @@ _autorespond() { > > mv /tmp/ai/ai.conf /tmp/ai/ai.conf.tmp > while IFS=' ' read -r _l; do >- [[ $_l == [!#=]*=?* ]] || continue >+ [[ $_l == [!#=]*=* ]] || continue > _key=${_l%%*([[:blank:]])=*} > _val=${_l##*([!=])=*([[:blank:]])} > [[ $_q == @(|*[[:blank:]])"$_key"@([[:blank:]?]*|) ]] && >- resp=$_val && cat && return >+ resp=$_val && cat && >+ if [[ -n $resp ]] then >+ return >+ else >+ break >+ fi > print -r " $_l" > done /tmp/ai/ai.conf > [[ -n $_def ]] && resp=$_def && return >