Results 1 to 8 of 8

Thread: What is /etc/alternatives ?

  1. #1

    Exclamation What is /etc/alternatives ?

    I just ran a recursive grep on /etc to find where a strange IP address might be defined. Much to my surprise, I started seeing a bunch of messages like:

    Binary file alternatives/jre_openjdk/lib/i386/server/libjvm.so matches

    At first I was outraged that someone had put library files in /etc. Then I did `ls -l' which showed that these are symlinks.

    `rpm -q --whatprovides /etc/alternatives/jre_openjdk/lib/i386/server/libjvm.so'

    Shows that this particular symlink was created by java-1_6_0-openjdk-1.6.0.0_b16-5.9.4.i586

    I see that not everything in /etc/alternative is java related. What is the purpose of this directory, and why is it in etc? Shouldn't something like this be in /usr/lib, or similar?

  2. #2

    Default Re: What is /etc/alternatives ?

    It's correct.
    See man update-alternatives.

  3. #3

    Default Re: What is /etc/alternatives ?

    I take issue with the use of /etc for this purpose:

    Linux Filesystem Hierarchy: /etc

    This is the nerve center of your system, it contains all system related configuration files in here or in its sub-directories. A "configuration file" is defined as a local file used to control the operation of a program; it must be static and cannot be an executable binary. For this reason, it's a good idea to backup this directory regularly. It will definitely save you a lot of re-configuration later if you re-install or lose your current installation. Normally, no binaries should be or are located here.

  4. #4

    Default Re: What is /etc/alternatives ?

    Lets not start to interpret documents as if we were lawyers.

    /etc is configuration, and alternatives is all about configuration. It has been this way in every distro for more than a decade.

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: What is /etc/alternatives ?

    Quote Originally Posted by hattons View Post
    I take issue with the use of /etc for this purpose:

    Linux Filesystem Hierarchy: /etc
    Every file in there is a symlink, the binaries are elsewhere.

  6. #6

    Default Re: What is /etc/alternatives ?

    Quote Originally Posted by ken_yap View Post
    Every file in there is a symlink, the binaries are elsewhere.
    And I'M accused of lawyering? What is certain is that the symlinks are not "local file[s] used to control the operation of a program". I probably never noticed this directory because I was using my own install of virtually everything linked there. Mind you, I did not look at the FHS when I concluded this was the wrong place for the alternatives directory. I only looked at the FHS for confirmation.

  7. #7
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: What is /etc/alternatives ?

    I'm not the one accusing you of lawyering. Symlinks are not binaries, they are configuration, the way they are used here. Symlinks are also files, in Unix terminology, as are directories and device nodes.

    But if you want to take it further, this is probably the wrong forum for it. Mind you, in the right forum you would be up against people who have thought about this already.

  8. #8

    Default Re: What is /etc/alternatives ?

    Where do Bodo and Lenz hang out these days?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •