On January 11, 2017 7:36:00 PM GMT+01:00, Theo Buehler <[email protected]>
wrote:
>> OK halex@, who would also accept a stricter regular expression in the
>sed command.
>>
>
>Alright, here's a stricter regular expression. Should I add "
>ftp.openbsd.org$"
>to it or is this good enough?
I think this is way better and good enough (even without a space after the
address). Ok halex@.
/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 18:33:06 -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