why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"?
In preparation for trying to build glibc-2.2.4 from source, I've been upgrading various programs (per the Glibc Installation HOWTO on tldp), including static-building bash-2.05b, on a RedHat 6.1 (i586, Intel P233) with gcc 2.95-3, using checkinstall-1.5.2-1 to do "make install", create the rpm and update the package database.
I got a strange behavior; once the new bash was installed in /usr/local/bin (the default for the GNU source), I could no longer open a terminal window. Rebooting gave errors because /bin/bash and the "/bin/sh -> bash" symlink had vanished! I fixed this using Tom's RTBT to access the HD and copy the new bash to /bin and create a new symlink, but I'm wondering why these had disappeared in the first place? I haven't had this happen with any other programs built from source and installed using checkinstall ( I'm usually building new programs from source because of dependency "hell", and am not particularly keen on updating my distribution version as I'm using old hardware).
Thanks in advance,
Uh, $BASH does not get installed to /usr/local/bin
it goes in /bin, there is a symlink from /usr/bin that points
to /bin, if you want you can put a symlink in /usr/local/bin
BUT, $BASH has to be accessible to all users...........so it
gets install to /bin
The question I was asking was why did this install delete /bin/bash, and the /bin/sh symlink (which shouldn't
have been touched at all) .
I know that bash is supposed to install to /bin; however, almost all, if not all, GNU sources of any program
default to installing under /usr/local/ (this makes it possible to have installed, for example, two different versions
of some programs (one under /usr/local and one under /usr or / for example), necessary in case of problems
with the new version). I could have added --prefix=/ (to get the new version to install directly to /bin) to
the ./configure command line, but didn't want to replace the existing bash until the new build was tested.
As I used the GNU defaults for configure, the new bash installed to /usr/local/bin, and should not have
touched anything at all in /bin. My only immediate mistake was failing to copy the new bash immediately
to /bin before rebooting, and if I had done that, I would not have discovered that the original /bin/bash
had disappeared (though with /bin/sh -> bash gone, the lack of sh would have been noticed quickly!)
If I had not had at least one emergency rescue disk available (I've got Knoppix, Tom's RTBT & LinuxCare
Rescue), I'd have had to re-install and re-build the entire 6.1 distribution.
|All times are GMT -5. The time now is 10:22 AM.|