Installer error

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Installer error

Pedro Caetano
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.


In /tmp/i i have the following files:
# ls -l
/tmp/i/
total 52
-rw-r--r--  1 root  wheel    365 Jan 11 11:45 fstab.sd0
-rw-r--r--  1 root  wheel    451 Jan 11 11:45 fstab.shadow
-rw-r--r--  1 root  wheel   1133 Jan 11 11:47 install.resp
-rw-r--r--  1 root  wheel    134 Jan 11 11:45 parts.sd1
-rw-r--r--  1 root  wheel     40 Jan 11 11:44 resolv.conf.shadow
-rw-r--r--  1 root  wheel  22997 Jan 11 11:47 ttys


The install finishes without any issues.

Best regards,
Pedro Caetano
Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Theo Buehler
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:

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:06:40 -0000
@@ -2715,7 +2715,8 @@ do_install(){
  # manually.
 
  # Remove entry for ftp.openbsd.org before final hosts file is created.
- sed -i '/129.128.5.191/d' /tmp/i/hosts
+ # Note we may have no hosts file if no interfaces were configured.
+ [[ -f /tmp/i/hosts ]] && sed -i '/129.128.5.191/d' /tmp/i/hosts
 
  # Add common entries.
  echo "127.0.0.1\tlocalhost" >/mnt/etc/hosts

Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Theo Buehler
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:

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

Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Robert Peichaer
On Wed, Jan 11, 2017 at 01:21:30PM +0100, Theo Buehler 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 rpe

>
> 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
>

--
-=[rpe]=-

Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Alexander Hall
In reply to this post by Theo Buehler


On January 11, 2017 1:21:30 PM GMT+01:00, Theo Buehler <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Theo Buehler
> 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?

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

Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Alexander Hall


On January 11, 2017 7:36:00 PM GMT+01:00, Theo Buehler <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Theo Buehler
In reply to this post by Pedro Caetano
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.

Thanks for the report. This should be fixed in the next snapshot.

Reply | Threaded
Open this post in threaded view
|

Re: Installer error

Pedro Caetano
Thank you for your awesome work :)

Em 11/01/2017 8:44 da tarde, Theo Buehler <[hidden email]> escreveu:

  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.

  Thanks for the report. This should be fixed in the next snapshot.