that is a demo.

It breaks hibernate.  Lots of things in boot.conf could break hibernate.
Why is that so surprising?  You haven't explained why you need to use
boot.conf

But furthermore, you want to skip boot.conf parsing entirely, in the
hibernate case.  I believe you have ignored the potential consequences
of that upon others.

[email protected] wrote:

> My justification is documented in the boot.conf manual:
> 
>      Remove the 5 second pause at boot-time permanently, causing
>      boot to load the kernel immediately without prompting:
> 
>            # echo "boot" > /etc/boot.conf
> 
> Is the proposed behavior incorrect?
> 
> > Disagree.
> > 
> > There is no justification for what you have in /etc/boot.conf
> > 
> > [email protected] wrote:
> > 
> > > Hello tech@,
> > > 
> > > Currently unhibernating doesn't work with this configuration:
> > > 
> > > # echo "boot" > /etc/boot.conf
> > > 
> > > The original kernel is booted instead of the hibernated one.
> > > This was fixed a few years ago for sysupgrade's /bsd.upgrade kernel but
> > > unhibernation was overlooked at the time.
> > > 
> > > Before:
> > > 
> > >   unhibernate detected: switching to /bsd.booted
> > >   booting sr0a:/bsd:...
> > > 
> > > After:
> > > 
> > >   unhibernate detected: switching to /bsd.booted
> > >   booting sr0a:/bsd.booted:...
> > > 
> > > Index: boot.c
> > > ===================================================================
> > > RCS file: /cvs/src/sys/stand/boot/boot.c,v
> > > retrieving revision 1.54
> > > diff -u -p -r1.54 boot.c
> > > --- boot.c        15 Jun 2020 14:43:57 -0000      1.54
> > > +++ boot.c        8 Sep 2021 14:45:09 -0000
> > > @@ -84,8 +84,6 @@ boot(dev_t bootdev)
> > >           isupgrade = 1;
> > >   }
> > >  
> > > - st = read_conf();
> > > -
> > >  #ifdef HIBERNATE
> > >   int bootdev_has_hibernate(void);
> > >  
> > > @@ -94,6 +92,8 @@ boot(dev_t bootdev)
> > >           printf("unhibernate detected: switching to %s\n", cmd.image);
> > >   }
> > >  #endif
> > > +
> > > + st = read_conf();
> > >  
> > >   if (!bootprompt)
> > >           snprintf(cmd.path, sizeof cmd.path, "%s:%s",
> > >
> 

Reply via email to