On January 11, 2017 1:21:30 PM GMT+01:00, Theo Buehler <[email protected]>
wrote:
>On Wed, Jan 11, 2017 at 01:10:12PM +0100, Theo Buehler wrote:
>> On Wed, Jan 11, 2017 at 11:52:02AM +0000, Pedro Caetano wrote:
>> > Hi tech@
>> >
>> > I was running an headless installation via serial using today's
>snapshot
>> > (10th January), and noticed something odd in the end of the
>installation
>> > proccess.
>> >
>> > Transcription below:
>> > What timezone are you in? ('?' for list) [Canada/Mountain]
>Europe/Lisbon
>> > Saving configuration files...sed: /tmp/i/hosts: No such file or
>directory
>> > done.
>> > Making all device nodes...done.
>> > Multiprocessor machine; using bsd.mp instead of bsd.
>>
>> The hosts file need not exist if no interfaces were configured (as is
>> noted in a comment a few lines after that sed command), so simply
>check
>> whether it exists before running sed:
>
>This way we don't check twice whether the file exists:
OK halex@, who would also accept a stricter regular expression in the sed
command.
/Alexander
>
>Index: install.sub
>===================================================================
>RCS file: /var/cvs/src/distrib/miniroot/install.sub,v
>retrieving revision 1.945
>diff -u -p -r1.945 install.sub
>--- install.sub 10 Jan 2017 17:50:58 -0000 1.945
>+++ install.sub 11 Jan 2017 12:19:58 -0000
>@@ -2714,15 +2714,14 @@ do_install(){
> # domain information or aliases. These are lines the user
>added/changed
> # manually.
>
>- # Remove entry for ftp.openbsd.org before final hosts file is
>created.
>- sed -i '/129.128.5.191/d' /tmp/i/hosts
>-
> # Add common entries.
> echo "127.0.0.1\tlocalhost" >/mnt/etc/hosts
> echo "::1\t\tlocalhost" >>/mnt/etc/hosts
>
> # Note we may have no hosts file if no interfaces were configured.
> if [[ -f /tmp/i/hosts ]]; then
>+ # Remove the entry for ftp.openbsd.org
>+ sed -i '/129.128.5.191/d' /tmp/i/hosts
> _dn=$(get_fqdn)
> while read _addr _hn _aliases; do
> if [[ -n $_aliases || $_hn != ${_hn%%.*} || -z $_dn ]];
> then