Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 1995 16:20:09 -0700 (MST)
From:      Barnacle Wes <wes@intele.net>
To:        jgoerzen@complete.org (John Goerzen)
Cc:        questions@freebsd.org
Subject:   Re: ****HELP*****
Message-ID:  <199512062320.QAA19749@intele.net>
In-Reply-To: <199512040746.BAA00543@complete.org> from "John Goerzen" at Dec 4, 95 01:46:02 am

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> > > It would be better if the installer would just:
> > >  1) Overwrite older versions of programs with the newer versions

> I'm not very much of a Unix expert at all, but it seems to me that problem #1 
> could easily be solved (the know binaries simply overwrite the old ones -- 
> assuming the have the same name, as most do).  #3 also, it just extracts the 
> tar.gz'd files, no problem there.

Obviously not very experienced with UNIX.  If any of the programs
you are attempting to overwrite happen to be running, you won't be
able to open them for writing, even as root.  You'll obtain EBUSY
(text file busy).  What you have to do is unlink the file (it won't
really be reclaimed until closed, i.e. the program exits) and then
create the new file with the same name.  This, of course, leaves
you with a small window of vulnerability where /bin/sh (and so
forth) does not exist!  It also has the side effect of fragging
your disk badly.  This is one of the many reasons most UNIX updates
are done off-line, in single user mode, or booted from an alternate
kernel ala Sun's miniroot.

-- 
   Wes Peters	| Yes I am a pirate, two hundred years too late
    Softweyr 	| The cannons don't thunder, there's nothing to plunder
   Consulting	| I'm an over forty victim of fate...
 wes@intele.net	|					Jimmy Buffet



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?199512062320.QAA19749>