Subject: Re: install-target for /sys/arch/*/conf/Makefile.* ?
To: Andrew Brown <atatat@atatdot.net>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: tech-kern
Date: 04/25/2000 13:35:18
> >        rm -f /onetbsd
> >        mv /netbsd /onetbsd
> >        cp netbsd /
> >.endif
> 
> it's a nice idea, but what if the machine panics during the final cp?
> this might be a better sequence.
> 
> 	cp /netbsd /onetbsd
> 	cp netbsd /newnetbsd
> 	mv /newnetbsd /netbsd
> 
> it's much more atomic.

an operation is either atomic, or not atomic.

the following *is* atomic:

	rm -f /onetbsd
	ln /netbsd /onetbsd
	cp netbsd /nnetbsd
	mv /nnetbsd /netbsd

					- Bill