Subject: Re: updating, build and install order
To: None <fredb@immanent.net>
From: Ben Harris <bjh21@netbsd.org>
List: current-users
Date: 06/20/2003 18:59:11
In article <Pine.NEB.4.53.0306201052270.26139@rapture.immanent.net> you write:
>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".

This isn't terribly relevant, since the procedure never puts the system in a
state where /netbsd is missing.  /onetbsd is there as a manual fallback if
the new kernel turns out to be broken somehow.

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

How so?  mv usually issues a rename() system call, which shouldn't clobber
the hard-linked file.  If it does, so will install.

> To get the
>same effect, you'd need to unlink "/netbsd" before the copy.

That's obviously silly, since it would leave the system without /netbsd for
a moment.

>Thirdly,
>the single "install" command, besides being more elegant, also sets
>the permissions consistently.

This is true.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/acorn26           <URL:http://www.netbsd.org/Ports/acorn26/>