Subject: Re: updating, build and install order
To: Frederick Bruckman <fredb@immanent.net>
From: David Brownlee <abs@netbsd.org>
List: current-users
Date: 06/20/2003 17:09:14
On Fri, 20 Jun 2003, Frederick Bruckman wrote:

> On Fri, 20 Jun 2003, David Brownlee wrote:
>
> > On Fri, 20 Jun 2003, Frederick Bruckman wrote:
> >
> > > On Fri, 20 Jun 2003, William Allen Simpson wrote:
> > >
> > > >   mv /netbsd /netbsd.old
> > > >   mv ../obj/sys/arch/i386/compile/GENERIC/netbsd /
> > >
> > > With that, there's a chance that an inopportune power failure could
> > > render the system unbootable. Better (IMO):
> > >
> > >     rm /netbsd.old
> > >     ln /netbsd /netbsd.old
> > >     sync; sync
> > >     install -cpr ../obj/sys/arch/i386/compile/GENERIC/netbsd /
> > >     sync; sync
> > >
> > 	'make install' in the compile directory should do the right thing.
>
> It doesn't seem to...
>
>     # make -n install
>     rm -f /onetbsd
>     ln /netbsd /onetbsd
>     cp netbsd /nnetbsd
>     mv /nnetbsd /netbsd
>
> For one thing, the i386 bootblocks won't fall back to "/onetbsd" if
> "/netbsd" is missing -- they fall back to "/netbsd.old". For another,
> "cp" plus "mv" is not the same thing as "install -pr" -- you're going
> to end up overwriting your backup kernel in "/onetbsd". To get the
> same effect, you'd need to unlink "/netbsd" before the copy. Thirdly,
> the single "install" command, besides being more elegant, also sets
> the permissions consistently.

	That woud be an argument for fixing the 'install' target in the
	Makefile....

-- 
		David/absolute          -- www.netbsd.org: No hype required --