Slashdot Mirror


Solving the /etc Situation?

mrfibbi asks: "/etc is a mess, plain and simple. Each program has its own (incompatible) config file format and the naming scheme/hierarchy is left almost solely to the author. Furthermore, package updates are a mess, either choosing to replace the entire config file, reject any updated versions (which leads to inconsistencies), or, as is the case with etc-update, asking the user to manually merge the files, which takes forever after a big update. We've revamped /dev with udev, but we've still failed to come up with a universal, duct-tape-free solution for the problem. Though solutions exist, there has been little or no adoption, either due to a personal dislike for the idea or API, or just an indifference to the problem. Should we work toward migrating to an Elektra-like system? Something else? Or do most simply find it not worth the trouble?"

293 comments

  1. I got an ... _angle_ by Tumbleweed · · Score: 4, Funny

    Simply port over the Windows registry, problem solved!

    1. Re:I got an ... _angle_ by Anonymous Coward · · Score: 3, Insightful

      Now there's a good solution. I will take the chaotic state of /etc over the Windows Registry NIGHTMARE any day. Hell, I'd rather get a good swift kick in the nuts than deal with the Windows registry nightmare

    2. Re:I got an ... _angle_ by jon787 · · Score: 1

      damn, beat me to it.

      --
      X(7): A program for managing terminal windows. See also screen(1).
    3. Re:I got an ... _angle_ by Tumbleweed · · Score: 2, Insightful

      Okay, the serious answer is that yes, 'a' registry would be a very useful thing - just not implemented in a half-assed, non-secure, non-manageable manner ala Windows.

      So, we make it a nicely-formatted XML text file, obviously.

      Each user should be able to access only their portion of the file.

      Each application can access only their portion of the file, and are _signed_ (by the system) as to what changed what and when.

      The amount of changes backed-up could be left to the user or sysad when the file is changed ("Do you want to backup the previous version?", etc.)

      As long as each user & app can only access their section, then modifications can be made predictable. Applications can't "hide" data in the registry, and since things can only access their data or the public data, information can be hidden from other users/apps who don't have a need to know.

      In short, I think a registry is a good idea, but I just hate that the name has gotten such a horrible rap because of how Windows implements one.

    4. Re:I got an ... _angle_ by Surye · · Score: 1

      GConf anyone? Only less per-user oriented and more system-wide oriented?

    5. Re:I got an ... _angle_ by bersl2 · · Score: 2, Insightful

      The user registry should be in the user's home directory.

      And do you know how disorganized a single file can get? Much more than a single directory, that's for sure. I like having a separate config file for things because file system operations are so much easier to handle than text editing alone.

      Some of you might find /etc messy, but I think it's a flowerbed compared to the jungle that is the Windows registry.

    6. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0
      Windows registry coming to Linux inspired me to write this little song:
      Gimme hope, j04nn4
      Hope, j04nn4
      Gimme hope, j04nn4
      'Fore the windows come
      Gimme hope, j04nn4
      Hope, j04nn4
      Hope before the windows come
      However, this project has the following benefits over the braindead ugliness gconf and its resource-whoring crack-using stepsister gconfd:

      - no deamon; a simple shared library
      - plainfiles instead of bloated and buggy XML

    7. Re:I got an ... _angle_ by Curtman · · Score: 1

      damn, beat me to it.

      No, they beat you to it.

    8. Re:I got an ... _angle_ by BrynM · · Score: 3, Insightful
      So, we make it a nicely-formatted XML text file, obviously.
      This sounds dangerous to me. Suppose and RPM writes a garbled line to the file by mistake. That could hose every app on the system. Don't get me wrong - a single file is a good idea, but it would take quite a bit of error checking for me to trust it.

      When it comes down to it, I would prefer some heirarchal system. I think the habit of some apps (like Apache) having their conf files in a subdirectory of /etc might be a good way to go.

      --
      US Democracy:The best person for the job (among These pre-selected choices...)
    9. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      STFU.

      Gconf and Gconfd are broken and misengineered beyond believe.

      Why does a single-user, single-machine configuration-system need a system-level deamon run with root privileges?

      Fucking stupid bloated ugly Gnome.

    10. Re:I got an ... _angle_ by Tumbleweed · · Score: 3, Insightful

      See, I don't think an app should be writing to the file; it should be a system service that writes the data to the file, otherwise, there's no way to enforce what and where an application does to said file.

    11. Re:I got an ... _angle_ by tzanger · · Score: 5, Insightful

      You are on crack. Seriously cheap crack. There are so many problems with your idea I can't even figure out where to start.

      One badass file that everything clamours to get access to, even through a well defined API is going to be hell. Contention abounds. A bug can kill the entire system configuration. And then you throw the saviour of the digital world into it: XML. Why don't you just make it a binary file and have every single problem the Win32 registry has.

      A unified configuration scheme is a great idea. XML really isn't IMO the solution, and one big badass file is certainly the wrong way to go about it.

    12. Re:I got an ... _angle_ by biglig2 · · Score: 1

      Sounds like a good idea, but of course the point of GNU/Linux is that it is not one product but a zillion products that you glue together to make a computer. So how do you make something new a standard for a zillion applications?

      Do the KDA and Gnome people have any insight? How do they make people conform to their standards?

      All that can, I guess, be done is for someone to implement a registry framework (including lots of tools to manipulate it for people, and a dev kit to make it trivial to build into your product), enlist a few dozen high profile applications to use it, and then hope that it catches on.

      --
      ~~~~~ BigLig2? You mean there's another one of me?
    13. Re:I got an ... _angle_ by RzUpAnmsCwrds · · Score: 1

      "non-secure"

      How is the registry non-secure? Registry keys have the same privelage options as items in the filesystem under Windows.

    14. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      I was only joking, and gconf doesn't run as root, so you STFU.

    15. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      Hell, I'd rather get a good swift kick in the nuts than deal with the Windows registry nightmare

      Hell, I would not!

    16. Re:I got an ... _angle_ by Anonymous Coward · · Score: 3, Insightful

      Uhm, are you joking? What you describe has already been invented, it's called "the filesystem".

      So, we make it a nicely-formatted XML text file, obviously.

      This is the "joke" part. Let's ignore it.

      Each user should be able to access only their portion of the file.

      Unix filesystem permissions? Check.

      Each application can access only their portion of the file,

      Open only the files you need? Check.

      and are _signed_ (by the system) as to what changed what and when.

      Not 100% sure what you mean (how can the system enforce this). I'll assume you mean version control. We have that, it's called RCS (and of course more sophisticated ones but I use RCS on my servers). Check.

      The amount of changes backed-up could be left to the user or sysad when the file is changed

      Available with RCS. Check. Actually with RCS you have a complete history of the file going back to day 1.

      Applications can't "hide" data in the registry

      I can search the filesystem with find, locate, etc. Check.

      In short, I think a registry is a good idea, but I just hate that the name has gotten such a horrible rap because of how Windows implements one.

      Us Unix folks just call lightweight hierarchical key/value databases "the filesystem". Easy to back up, copy, merge, store, read, edit, understand, etc..

      Why reinvent the wheel?

    17. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      Standard format that allows easy configuration
      and syntax checking by automated tools? FAIL

    18. Re:I got an ... _angle_ by MeanMF · · Score: 2, Informative

      The user registry should be in the user's home directory.

      Ever wonder what that NTUSER.DAT file in your home directory is?

    19. Re:I got an ... _angle_ by Directrix1 · · Score: 1

      I agree. But I definetely think that an alternate is needed severely. Elektra would work quite easily as long as they adopt a little extra policy that says inside each programs folder they need to have a subfolder for each installed version of the software. These subfolders could be symlinks to the other folders if they wanted to use the same conf in different versions. Additionally, I've seen a comment on Elektra's lack of a 'list' datatype as one of the available key/value pairs (Elektra currently only supports 'strings' and 'binary' datatypes). I think adding those two things would make it a workable framework.

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    20. Re:I got an ... _angle_ by Directrix1 · · Score: 1

      You mean like Elektra. Like what the article linked to?

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    21. Re:I got an ... _angle_ by Lord+Kano · · Score: 1

      Each user should be able to access only their portion of the file.

      Rather than re-invent the wheel, why not use existing file permissions? Each user get's their own directory for config files.

      Maybe we could call it their "home" directory.

      In short, I think a registry is a good idea, but I just hate that the name has gotten such a horrible rap because of how Windows implements one.

      I completely agree that a registry could be a great thing if it was done properly, but we have a working system. The /etc directory came about naturally. It was easy and convienent to store config files there.

      LK

      --
      "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
    22. Re:I got an ... _angle_ by Directrix1 · · Score: 1

      But actually I suppose the real problem here is the lack of a tool that non-destructively updates the config files for newer versions without requiring user input, or only requiring an easy Q&A sequence which can be scripted (oh that would be sweet). Really, my main concern with this stuff is easy administration on a large volume of servers/workstations without having to use something like cfengine (eeek).

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    23. Re:I got an ... _angle_ by orkysoft · · Score: 2, Interesting

      Instead of having nested XML tags, we could use directories and text files! Oh, wait...

      --

      I suffer from attention surplus disorder.
    24. Re:I got an ... _angle_ by Ogerman · · Score: 1

      Why reinvent the wheel?

      Congrats! Great minds indeed think alike. You've just re-invented Elektra. Read the original article. (-: Seriously! Go read it! You'll laugh at how similar Elektra is.

      The only exception is that it might be nice to have XML metadata throughout the hierarchy for optional type-checking, etc. by automated tools.

    25. Re:I got an ... _angle_ by bersl2 · · Score: 1

      That's not what the statement is about. When the GP states,

      Each user should be able to access only their portion of the file.

      he is implying that everything is kept in the central registry, when clearly this should not be. Such things also require semantics that are only in Reiser4.

    26. Re:I got an ... _angle_ by Ogerman · · Score: 1

      So, we make it a nicely-formatted XML text file, obviously. Each user should be able to access only their portion of the file.

      This would require a bunch of new software and a config daemon running all the time. This daemon would be an additional single point of failure or possible attack vector. It would also eliminate the possibility of manual repair should something go completely awry.

      The Elektra folks already though about the whole XML approach and they've described quite nicely why it isn't such a great idea. Using standard Unix filesystems are a much better way to do everything you're talking about, but without requiring a huge collection of new tools and techniques. Please read the Elektra website mentioned in the original article for more! It really is an ingenious, yet DUH-obvious solution.

    27. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      mrfibbi is an MS shill?

    28. Re:I got an ... _angle_ by ErikZ · · Score: 1

      Ok, so create a daemon that has error checking up the wazzo.

      Any centalized method should have that, plus strict usage methods.

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    29. Re:I got an ... _angle_ by really? · · Score: 1

      Yeah, have something like an "etc API" perhaps?

      --

      "Consistency is contrary to nature, contrary to life. The only completely consistent people are the dead." A. Huxley
    30. Re:I got an ... _angle_ by Foolhardy · · Score: 3, Informative

      The only things centralized about the registry are that it has a single database server that does the actual file writes while providing a high level API, and it has a single-root hierarchy.
      Data in the registry is stored in hives mounted at various places in the registry's hierarchy. The registry's root is a key named \REGISTRY in the Object Manager's namespace. Win32 confuses things a little by renaming \REGISTRY\MACHINE to HKEY_LOCAL_MACHINE and \REGISTRY\USER to HKEY_USERS, and providing some pseudo keys, like for the current user, but the idea is the same. The RegLoadKey, RegUnLoadKey and RegSaveKey functions can be used to dynamically mount, unmount and copy hives in the registry. The key \REGISTRY\MACHINE\SYSTEM\CurrentControlSet\Control \hivelist contains a list of all the hives to be automatically mounted at startup. Go ahead, divide the registry into as many hives as you want, and put them where ever you want.

      What I'm trying to say is that the registry is no more centralized than the VFS is in Linux. The registry consists of various hives mounted at different locations, just like the VFS consists of various filesystems mounted at different locations.

      As for messyness, is this due to the structure of the registry itself, or Microsoft's usage of it: do you really think that if Windows used an /etc it would be any better documented or organized?
      Personally, I don't think the layout is all that bad.

    31. Re:I got an ... _angle_ by drsmithy · · Score: 1
      Now there's a good solution. I will take the chaotic state of /etc over the Windows Registry NIGHTMARE any day.

      I'm still waiting (after, what, ten years now ?) to suffer from this "nightmare" that the Windows registry allegedly is.

      Hell, I'd rather get a good swift kick in the nuts than deal with the Windows registry nightmare.

      The main difference is, dealing directly with /etc on unix is basically mandatory. Dealing directly with registry contents in Windows is a very uncommon corner case (and if it isn't, you're doing something very wrong).

      The *problem* isn't /etc per se. The *problem* is that the end user (and, yes, that includes advanced users) have to modify its contents directly to make changes - with no sanity checking or validation on their input. The semantics of inconsistent file formats, locations and naming convenientions are largely irrelevant if you have a decent abstraction layer (which is not to say there shouldn't be standards, but a decent abstraction layer makes them a minor problem instead of a major one).

    32. Re:I got an ... _angle_ by drsmithy · · Score: 2, Interesting
      Okay, the serious answer is that yes, 'a' registry would be a very useful thing - just not implemented in a half-assed, non-secure, non-manageable manner ala Windows.

      How is the registry "non-secure" and "non-manageable" ?

      It can be remotely edited, or (much preferably) modified via Group Policy for centralised system configuration.

      Its "locations" and "structure" are well defined.

      Access is restricted down to the key level by per-user ACLs.

      It's transactional.

      A user's personal registry settings are stored in their profile.

      Automatic backups are made by the system.

      The problem, as with 99% of "Windows problems" is not with Windows, but with poor software developers misusing - or not using at all - the system's facilities properly.

    33. Re:I got an ... _angle_ by Tumbleweed · · Score: 1

      The thing is, a poorly designed (or sneakily designed) application shouldn't be _allowed_ to misuse the system, intentionally or not.

    34. Re:I got an ... _angle_ by Mr.+Slippery · · Score: 1
      The *problem* is that the end user (and, yes, that includes advanced users) have to modify its contents directly to make changes - with no sanity checking or validation on their input.

      You don't have to deal with it directly. The "abstration layer" is something like redhat-config-whatever, or webmin, or linuxconf.

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    35. Re:I got an ... _angle_ by drsmithy · · Score: 1
      Suppose and RPM writes a garbled line to the file by mistake. That could hose every app on the system. Don't get me wrong - a single file is a good idea, but it would take quite a bit of error checking for me to trust it.

      Ignoring the fact that an application or installer shouldn't be writing non-sanity-checked data directly to a config file, I would personally consider a sysadmin's typo far more likely to corrupt a config file than an RPM install.

    36. Re:I got an ... _angle_ by klui · · Score: 2, Interesting

      I very much like Apple's OS X approach. Separate files for each service/application. The problem with Windows's registry is that there are many entries that references other entries. If an application's uninstaller is not written just right, you will have dangling references polluting your hive. Apple's approach is very much like Mac OS. If you remove an app, you know that you can go to (basically, there are exceptions) System Folder:Preferences and remove the app's preference file/folder. With the Windows registry, you're never really sure since there are a lot of GUIDs like "{4D36E97B-E325-11CE-BFC1-08002BE10318}" where you have no idea what they mean.

      As far as XML, it doesn't really matter if it's done using XML or the Windows .INI construct. Just don't make the damn thing binary. Even Apple's XML files contains encoded binary. Not very user friendly, but I suppose they've done that on purpose. You can be sure that information can be hidden, regardless of how it's implemented.

    37. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      its a bloody windows file! get it out get it out get it out!!!!!!!

    38. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      I was so hoping for +5 Funny...+3 insightful...interesting, but +5 funny would have been better for my parent post...

    39. Re:I got an ... _angle_ by tomhudson · · Score: 1
      Dealing directly with registry contents in Windows is a very uncommon corner case (and if it isn't, you're doing something very wrong).
      ... or removing malware ... sometimes the only way to remove it IS to edit the registry by hand.
    40. Re:I got an ... _angle_ by aichpvee · · Score: 1

      You'll probably recover from a kick to the nuts in fairly short order. The windows registry nightmare is forever.

      --
      The Farewell Tour II
    41. Re:I got an ... _angle_ by Anonymous Coward · · Score: 0

      The real solution is for everyone to adopt the Slackware /etc setup and have done with it. One system for everyone that doesn't suck.

    42. Re:I got an ... _angle_ by jbolden · · Score: 1

      /etc is documented for just about every program. Registry entries are not. I set things to non defaults all the time in Unix in Windows I can't begin to figure out how to do this.

    43. Re:I got an ... _angle_ by jbolden · · Score: 1

      Lots and lots of users demanding read access to tables or information. A few users demanding write access to tables of information.

      Hmm its not like database vendors haven't worked on this problem before. We know how to handle this.

    44. Re:I got an ... _angle_ by jbolden · · Score: 1

      ow is the registry "non-secure" and "non-manageable" ?

      Non-secure:
      1) I can't easily diff to determine what an application installer did.

      2) I can't manually run parts of the installers (like I can with .rpm or .deb files) and thus control the installation.

      Non-manageable:
      1) The settings for most applications aren't clearly documented unlike Unix /etc settings
      2) Its not always clear which applications own which entries
      3) The settings often use binary keys rather than text keys

    45. Re:I got an ... _angle_ by Oopsz · · Score: 1

      Gentoo does this with dispatch-conf and RCS.. automatically merges if minimal, and stores all incremental changes.

    46. Re:I got an ... _angle_ by Oopsz · · Score: 1

      plus decent revisioning.

    47. Re:I got an ... _angle_ by Directrix1 · · Score: 1

      Yeah, I use dispatch-conf. I essentially want a framework that software devs would describe changes in config file syntax, security issues and junk like that for updating their conf files. There is only so much that the diff command can do. And I hate how comments get clumped in with config entries, etc. Mainly I just want something where I can answer the questions about the differences and then deploy the answers to all the other computers after installation.

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    48. Re:I got an ... _angle_ by drsmithy · · Score: 1
      I can't easily diff to determine what an application installer did.

      Firstly, that's not a security issue.

      Secondly, you can (although doing it with diff instead of a proper registry tool would be a bit more fiddly).

      I can't manually run parts of the installers (like I can with .rpm or .deb files) and thus control the installation.

      Blame the person who wrote the installer then.

      The settings for most applications aren't clearly documented unlike Unix /etc settings

      Heh. You're kidding, right ? The contents of /etc "well documented" ?

      "The settings" for most applications *shouldn't be manipulated within the registry by the user*. That's the job of the configuration tool.

      Its not always clear which applications own which entries

      It's not always clear which applications own what in /etc, either. In both cases, it's the application's fault.

      The settings often use binary keys rather than text keys

      This is not automatically "bad".

      Your "criticisms" are all based on the principle of using the Registry in the same way you have to use /etc on unix - by editing it directly. This is an invalid comparison, because end users (and that includes sysadmins) are not meant to directly edit the values in the Registry. If you have to, it's a failing of the software. The Registry is a database for storing configuration information, it is *not* a giant text file you edit to configure things.

    49. Re:I got an ... _angle_ by drsmithy · · Score: 1
      /etc is documented for just about every program.

      If you already know what you're doing, maybe.

      Registry entries are not.

      Nor do they need to be outside of the software developer - end users are not supposed to directly manipulate registry contents. That's one of the main points of it.

      I set things to non defaults all the time in Unix in Windows I can't begin to figure out how to do this.

      Your misunderstanding of Windows is not a failing of Windows anymore than someone not knowing how to use 'man' is a failing of unix.

      You should not directly edit registry values. Doing this completely nullifies some of the Registry's major advantages. Until you can break out of this mindset, you cannot make a valid comparison.

    50. Re:I got an ... _angle_ by jbolden · · Score: 1
      You seem to be agreeing with the critics of the registry type system. The whole thread has been arguing that the registry offers the advantages of /etc: a readable, changeable collection of setting for all programs without the inconsistency. You are arguing they aren't changeable outside of the preferences settings in the applications. But it is very common for their to be hidden options in both Unix and Windows programs where you want to change registry contents.

      Lets take some windows examples:

      And most importantly, right-click on a folder, and open it's path in a command prompt.
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Fold er\shell\ CMD Here\command]
      @="cmd.exe /k pushd %L "

      set the Autocomplete in a command line to the tab key:
      [HKEY_CURRENT_USER\Software\Microsoft\Comman d Processor]
      "CompletionChar"=dword:00000009

      hkey_current_User\software\microsoft\windows\cur re nt version\policies\explorer you can do tons of things to customize the desktop and start menu

      following are all dword values set to 1 that you can change to 0

      NoClose
      NoDesktop
      NoRun
      NoStartMenuLogoff
      No Find
      NoSMMyDocs
      NoDrives
      NoControlPanel

      This one comes from Microsoft How to change the company name and user name in Office:
      HKEY_CURRENT_USER\Software\Microsoft\Offi ce\9.0\Co mmon\UserInfo
      HKLM\Software\Microsoft\Windows\Cur rentVersion\Ins taller\Userdata\SID\Products\GUID\InstallPropertie s

      I could go on but you get the point. Programs don't provide access to all their settings information in their interfaces. You do need to change these settings. /etc and the registry both offer ways of getting to far more of these settings but /etc tends to be much better documented than the registry because its written to be human readable.

      I'm in the wrong mindset, this is an example of a windows user presenting a flaw as an advantage. Power users want access to as many of a program's settings as possible that don't require source code changes. That's the whole reason for having settings files and not just compiling in the options. Windows defines their "power users" in this sense to be the in-house build team while Unix pushes this down to end user / administrators.

    51. Re:I got an ... _angle_ by jbolden · · Score: 1

      I responded to the "why changing registry enteries is good" in the other thread so I won't here. I'll address the other topics.


      --I can't manually run parts of the installers (like I can with .rpm or .deb files) and thus control the installation.

      Blame the person who wrote the installer then


      Its not the installers that are the problems. Its the culture. InstallShield, Wise Installer, Install anywhere, etc... don't provide a documented interface to their configuration files for the installable .exe; for the same reason that you don't think registry entries should be edited. They don't think end users will want things in a non default way. Conversely the Unix .deb and .rpm format are designed to allow for non default installations because they expect end users to want to make changtes.

      --Its not always clear which applications own which entries

      It's not always clear which applications own what in /etc, either. In both cases, it's the application's fault.


      Really. Can you give me an example of this? I almost never have trouble identifying who owns what in /etc.

      Finally if end users are not supposed to edit configuration data than what difference does it make if it is in a standardized format or not?

    52. Re:I got an ... _angle_ by Stinking+Pig · · Score: 1

      Well, there's also the fact that a lot of Unix/Linux people haven't actually touched Windows in a meaningful way since Win98 was the new hotness. If you've never managed a Windows environment, you're not really qualified to talk about how and why it sucks IMHO. It does suck, but often not for the reasons that are given by people with no experience.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
  2. Simple by ambrosen · · Score: 3, Insightful

    /HKEY_LOCAL_MACHINE/ /HKEY_CURRENT_USER/ /HKEY_CLASSES_ROOT/ /HKEY_CURRENT_CONFIG/
    & /HKEY_USERS/

    should do it, I'd have thought. Then restrict it to a tree structure only under there and everybody should be happy.

  3. Re:nothinbg by Anonymous Coward · · Score: 0

    Let's see you do it better!

  4. A simple request by HotNeedleOfInquiry · · Score: 2, Insightful

    Ok, I'm just a humble hardware engineer that has to support a couple Linux servers. So when I have to muck with /etc I make sure I'm close to a google window where I can run for help.

    I'd be very grateful for nothing more than a README file, in /etc, for each application and service that tells what the files are named and what they do. Is that so much to ask?

    --
    "Eve of Destruction", it's not just for old hippies anymore...
    1. Re:A simple request by jon787 · · Score: 3, Insightful

      A well commented config file with inline examples is even better. Sure they might end up being 10x longer than necessary, but they are readable.

      --
      X(7): A program for managing terminal windows. See also screen(1).
    2. Re:A simple request by DustMagnet · · Score: 1
      'd be very grateful for nothing more than a README file, in /etc, for each application and service that tells what the files are named and what they do. Is that so much to ask?

      To me that would be pointless. There should be a man page for each file in /etc. For the most part there is, but I was able to find a few that don't have them. A separate README file would just led to more out of data documentation.

      Of course you could do something silly like this:

      #!/bin/csh
      foreach f (/etc/*.conf)
      man $f > /etc/README.$f
      if ($status != 0) /bin/rm -f /etc/README.$f
      end
      --
      'SBEMAIL!' is better than a goat!!
    3. Re:A simple request by Curtman · · Score: 2, Insightful

      A well commented config file with inline examples is even better.

      I don't see the problem with the man pages. Except when they are non-obvious. But anything that simply doesn't have one should be filed as a bug IMHO.

    4. Re:A simple request by jon787 · · Score: 3, Insightful

      Well with the larger config files knowing where to start can be an issue, so a well commented default config file is nice.

      --
      X(7): A program for managing terminal windows. See also screen(1).
    5. Re:A simple request by VargrX · · Score: 1
      I'd be very grateful for nothing more than a README file, in /etc, for each application and service that tells what the files are named and what they do. Is that so much to ask?


      try this out for size:

      'man -k foo'

      and then try these:
      /usr/share/doc
      /usr/share/examples
      /usr/local/share/doc
      /usr/local/share/examples

      --
      Sometimes people just have to learn and adapt to change, it is one of the requirements of being a living thing.
    6. Re:A simple request by Ogerman · · Score: 1

      A well commented config file with inline examples is even better.

      A GUI admin interface with all options, possible values, descriptions, and examples sourced from XML meta-data is even better.

      Elektra now! (: .. Plus optional XML meta-data in the config hierarchy so we can make our lives easier with modern admin tools.

      http://elektra.sf.net

    7. Re:A simple request by Brandybuck · · Score: 1

      There should be a man page for each file in /etc.

      I use FreeBSD, and for all of the files the system dumps in there, there is a manpage.

      p.s. With the exception of sendmail. That's because the main configuration files do not have fixed names. I think if sendmail ever got its act together, half the angst over /etc would evaporate.

      --
      Don't blame me, I didn't vote for either of them!
    8. Re:A simple request by drsmithy · · Score: 2, Informative
      I think if sendmail ever got its act together, half the angst over /etc would evaporate.

      I use Postfix in preference to Sendmail on every machine I have control over, and it hasn't reduced my "angst" any.

    9. Re:A simple request by kwerle · · Score: 1

      Wouldn't it be great if it were an XML file with a link to it's validator, and the tool you opened it with was an editor that understood XML files and validators?

      Options: done.
      Validation: done.

      Naw, too easy.

  5. Re:nothinbg by Raisputin · · Score: 1

    Heh, that's what I got when I clicked on the "Read more..." Link heh. Guess I am faster than /. these days

    --
    +(norad) if you rearrange the letters in mother in law, you get woman hitler
  6. I have a solution: by Anonymous Coward · · Score: 1, Funny

    /usr/local/etc

    1. Re:I have a solution: by Anonymous Coward · · Score: 0

      FreeBSD's been there, done that, got the t-shirt.

    2. Re:I have a solution: by Anonymous Coward · · Score: 0

      FreeBSD's been there, done that, got the t-shirt.

      Are you retarded?

    3. Re:I have a solution: by Nimrangul · · Score: 1

      I don't think they realised it was meant as a joke, they look to have thought it a serious suggestion at a solution.

      --
      I'm sick of following my dreams - I'm just going to ask them where they're going and hook up with them later.
    4. Re:I have a solution: by rabbit78 · · Score: 1

      Maybe you meant this as a joke, but the idea is not entirly new. In fact, the BSDs (and possibly other Unices?) are using that for some time now, and it greatly helps to get the system organized.

      The idea is to put the system configuration stuff in /etc and the configuration of additional (non-system) software in /usr/local/etc (or /usr/pkg/etc in NetBSD). I think at least the stuff in /etc is mostly conforming to the usual rc.conf syntax, but I might be wrong here.

  7. I use et al by christopherfinke · · Score: 4, Funny

    Have you ever thought of using et al instead of etc?

    1. Re:I use et al by wakejagr · · Score: 1

      I find that when I use et al, i need to explain the linguistic origins of the phrase. People are more used to etc (but don't know that it comes from latin), but they get scared when they see et al ("What language is that?!?!?"). Note: like much in this world, this does not apply to academia.

      --
      Don't save Windows XP! http://www.petitiononline.com/jjw1xp/petition.html
    2. Re:I use et al by hoborocks · · Score: 1

      "et al" is generally used for authoring of a work: e.g. (whee! another acronym.) "Jones, et al" meaning "Jones, Dewey, Cheatem, and Howe wrote this book/paper/magazine article/instruction manual".

      "etc." is used to talk about a large group of items without mentioning each item!

      These are two distinct things here...keep that straight! :-D

      --
      AccountKiller
    3. Re:I use et al by jamesh · · Score: 1

      I remember reading an mskb article that made mention of the hosts file, which lived in
      C:\Windows\System32\Drivers\and so on

      obviously someone didn't like the use of 'etc' and so replaced it with 'and so on'

  8. so.. clearing the mess.. by gl4ss · · Score: 3, Interesting

    to clear /etc/ you would create another one that would need programmers to comply to that?

    wouldn't it be actually easier to get them to place stuff in /etc/ so that they're logically placed and findable?

    because going over to elektra seems actually more work. even elektra's web page admits.. "It is much more an agreement then a piece of software. Relation is 99% to 1%.".

    do I have a problem with /etc/blaablaa? no. it's hell a lot better than registry still and at least I got SOME idea where the config file is.

    --
    world was created 5 seconds before this post as it is.
    1. Re:so.. clearing the mess.. by GigsVT · · Score: 1

      We can't even some people to use /etc correctly. I won't say who, but it starts with a P and ends with ostgres.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    2. Re:so.. clearing the mess.. by Ogerman · · Score: 2, Insightful

      to clear /etc/ you would create another one that would need programmers to comply to that?

      Elektra-style configuration could easily be phased in over time. That's part of the beauty and simplicity of it.

      wouldn't it be actually easier to get them to place stuff in /etc/ so that they're logically placed and findable?

      It wouldn't solve the problem -- which is that it takes too much time and effort to administer a system using today's /etc mess. It has very little to do with logical /etc organization. It has everything to do with trying to figure out what the options are, what the valid values are, and how to integrate the slew of packages necessary to make a working system for real-world needs. Yes, the real world needs standard, Open Source GUI admin tools.

      The Elektra design is on the right track. The only thing it is missing is optional XML meta-data that can describe the key-value hierarchy to a new generation of admin tools. Everything else is perfectly taken care of by the filesystem. Imagine if, instead of editing long, heavily commented config files, you could browse through a logical hierarchy of the options. Whenever you select an option, a side panel lists the valid values, describes their purpose, and gives usage examples. Upon edit, the admin tool validates the value entered and logs the change with a timedate stamp. If you want, you can add notes too.. these are stored in your home directory or optionally within the metadata as well. (though a different file)

      Beyond configuring individual packages, switching a standardized config hierarchy would enable a new generation of intelligent, modular admin tools. As example, imagine if the software could automatically "wire up" all the tools needed for a complete mail or file server. You choose what packages you want and the admin tool looks up a default "recipe" for making them work together. Then all you have to do is configure the specifics for you installation. Sure beats endless HOWTO's for every combination of Linux distro, MTA, IMAP server, webmail, spam filter, virus filter, etc.

      I've been administering Linux for 8 years now and this would absolutely be a dream come true.

    3. Re:so.. clearing the mess.. by Brandybuck · · Score: 1

      It's up to the application writers to do this, because they are the ones who ultimately own the software. It would be *nice* if they all used the same file format, but pretending XML is it, it naive. As an admin, I don't have to hand tweak every configuration file. Really I don't. Anyone who says otherwise just doesn't have a life. Granted, I don't run a server, but the ONLY file I tweak in /etc are resolv.conf, sysctl.conf, sudoers and X11/xorg.conf. Moving to Elektra won't mean I can stop tweaking them, only that I will have some gooey clicky front end to use instead of old reliable vi. I will STILL have to know what those tweaks mean.

      --
      Don't blame me, I didn't vote for either of them!
    4. Re:so.. clearing the mess.. by isorox · · Score: 1

      to clear /etc/ you would create another one that would need programmers to comply to that?

      To clear /etc is a matter of rm -Rf /etc

    5. Re:so.. clearing the mess.. by Hannes+Eriksson · · Score: 1

      Ever actually tried doing that? (rm -rf /etc)
      Last I tried, the system told me "You don't exist. Go away!"

      --
      Geek rants since like... 2000 or something.
    6. Re:so.. clearing the mess.. by gl4ss · · Score: 1

      exactly..

      I installed debian on a friends p3-600mhz laptop yesterday. didn't have to hand edit a single line of configuration and everything works(including sound, some gfx acceleration through the ati driver, it even goes to sleep when you close the lid).

      (why debian? well, it was the first that came up to my mind as something that's pretty easily installed on a machine that lacks cdrom, but has networking- but bringing it up here being that I didn't need to edit _any_ configuration by myself, debians package system built in configuration usually does it's job pretty well)

      --
      world was created 5 seconds before this post as it is.
    7. Re:so.. clearing the mess.. by Anonymous Coward · · Score: 0

      Was this before or after you killed your master.passwd?

  9. Windows Registry by Anonymous Coward · · Score: 0

    I agree! The windows registry is a much better solution to the problem....

  10. This is just how OSS is... by JacquesPinette84 · · Score: 5, Interesting

    OSS is about choises, and /etc really highlights this. People have different ideas on how apps should be configured, and I think putting all configurations in one place was a good compromise.

    1. Re:This is just how OSS is... by cognibrain · · Score: 1

      OSS is about choises, and /etc really highlights this. People have different ideas on how apps should be configured,

      My choice is to have all the apps on my system configured the same way. The app developers don't agree with me? Fine - I have the sources, so I can make it happen myself. This is how F/OSS is... We don't have to submit to chaos and claim it's just inevitable in the OSS world.

    2. Re:This is just how OSS is... by HawkingMattress · · Score: 1

      The sentence "OSS is about choices" is generally used to say that the users can choose between several alternatives.
      Here the users have the choice between having a messy architecture.

      OSS is about having to deal with a constant lack of consistency :)

    3. Re:This is just how OSS is... by Anonymous Coward · · Score: 0

      Here the users have the choice between having a messy architecture.

      No, the users may be choosing to install and maintain a messy architecture. But OSS allows the user to make their own changes. That's the fundamental point. Don't like that a def456 stores its config file in /etc/def456.conf and its logs in /var/log/def456.log? It's OSS -- change it; it's OSS fergodsake!

    4. Re:This is just how OSS is... by Ogerman · · Score: 3, Insightful

      OSS is about choises, and /etc really highlights this. People have different ideas on how apps should be configured

      OSS is about choices. But not all choices bring value to the community. As a long time Linux admin, I can tell you that peoples' different ideas on how apps should be configured does NOT bring any value whatsoever to Open Source. It does quite the opposite. We absolutely must find a compromise and bring sanity to the situation.

      So far, Elektra is the best compromise. It doesn't require any new tools. It doesn't require any drastic changes in most software. It doesn't create any single points of failure. It retains the human readable and human editable nature of /etc. It makes security more granular. And most importantly, it opens the door for a new generation of GUI admin tools that will make Unix administration accessible to the masses of existing Windows admins who don't have time to re-learn everything they know. Of course, it'll also improve the lives of seasoned Unix admins as well. At least those who value their time..

      Elektra + XML meta-data now! (:

    5. Re:This is just how OSS is... by Anonymous Coward · · Score: 0

      OSS is about choises, and /etc really highlights this. People have different ideas on how apps should be configured, and I think putting all configurations in one place was a good compromise.

      Such compromises assume that none of those different ideas are better than any of the others. The real reason for the compromise is that everyone is too chicken shit to say "This is stupid!". When someone does, people respond with "OSS is about choices..." and other such drivel.

    6. Re:This is just how OSS is... by JsTwO · · Score: 1
      OSS is about choices. But not all choices bring value to the community.

      does it matter? the programmer's choice will carry more weight than a end user. my code always bring value to myself the only community i really cared unless it's a paid job. what community r u talking about? force something as irrelevant as config file format to ppl is not OSS's way of doing things.
    7. Re:This is just how OSS is... by klui · · Score: 1

      Ha! Good luck trying to maintain your set of changes as soon as you have a bunch of your apps get rev'ed up.

  11. Simple-GConf by Anonymous Coward · · Score: 0

    People have suggested using an XML based etc/ This is really appropriete for XML because most files under etc/ are small and infrequently read. Maybe a DB backed etc/ for ease of maintainance across a large pool of machines?

    1. Re:Simple-GConf by Anonymous Coward · · Score: 0

      This is really appropriete for XML because most files under etc/ are small and infrequently read.

      Like all OMG-TEH-XML-IS-GOOD-4-EVARYTHING-morons, you miess the point.

      XML is for hierarchical, complex data-structures.

      The configuration-system deals with flat, key-value-pairs.

      I seriously hope you don't even think about doing something in the IT-industry.

    2. Re:Simple-GConf by Anonymous Coward · · Score: 1, Interesting

      Like all OMG-TEH-XML-IS-GOOD-4-EVARYTHING-morons, you miess the point.

      Straw-man. Nobody says that XML is good for everything, and the person you responded to certainly didn't.

      XML is for hierarchical, complex data-structures.

      Sounds like config files to me.

      The configuration-system deals with flat, key-value-pairs.

      Which configuration system? /etc is full of different ones. Most people who talk about "key-value pairs" advocate something like INI-style. Pretty much every non-trivial INI-style config file format I have seen ends up with things like config1=, config2=, confign= in numerous [section]s - basically, shitty workarounds to try and store hierarchical data with a non-hierarchical syntax.

      I seriously hope you don't even think about doing something in the IT-industry.

      Dickhead.

    3. Re:Simple-GConf by Anonymous Coward · · Score: 0

      There's many programs with hierarchical, complex structures, such as Apache. Have fun with your INI files.

  12. I have the answer by HawkingMattress · · Score: 3, Funny

    Let's turn all those files into XML, integrate Xalan into the kernel, and change the cd command to have it evaluate XPATH requests. Then some magical thing will probably happen !

    --
    <runs_away type="duck" reason="run forest, run !"/>

    1. Re:I have the answer by curious.corn · · Score: 2, Interesting

      You're joking but seriously... look at what Apple did... /Library/Preferences/*.plist is a simple, human parsable, easily scriptable, programmatically manipulatable (with a concise API) way. All current different weird file patters could be collapsed in an unique versatile structure that could be (ad lib) mapped to a registry like GUI or handled by sh scripts or vi. I vote for com.example.app.plist files

      --
      Mi domando chi à il mandante di tutte le cazzate che faccio - Altan
    2. Re:I have the answer by Ogerman · · Score: 1

      I vote for com.example.app.plist files

      It's an improvement, but Elektra plus optional XML meta-data is much more powerful and flexible. Forget new APIs and use our trusty filesystems instead.. it makes perfect sense. Seriously.. head over to http://elektra.sf.net and read all about it! (:

    3. Re:I have the answer by phallstrom · · Score: 1

      Then some magical thing will probably happen!

      Profit?

  13. How about changing the GPL? by WebHostingGuy · · Score: 3, Funny

    Insert a clause in the GPL stating that all programs using any part of any component or system must prepare their config files in the following format and must have the following directory structure /etc/program/bin, /etc/program/config, etc.

    Seriously though. The best way would be to set up a standard and then begin to push the agenda across the linux distributions asking them to ask the developers to abide by the standard.

    Another offbeat solution is that: (You can have a kernel module which reads the program files and if not in the correct format will tell the user it is wrong and therefore it will not run the binary. This would get users to 1. hack a solution or hopefully 2. complain to the developers to fix the problem.)

    Or maybe make programs use a specific installer which does this...

    Or you could chmod all the other directories to prohibit the programs from writing someplace else...

    --
    Quality Hosting e3 Servers
    1. Re:How about changing the GPL? by seneces · · Score: 1
      (You can have a kernel module which reads the program files and if not in the correct format will tell the user it is wrong and therefore it will not run the binary. This would get users to 1. hack a solution or hopefully 2. complain to the developers to fix the problem.)
      I don't think making all software not run until the user upgrades it to the newest version that supports FancyNewConfigurationScheme v1.3 is the right solution. That isn't likely to make many people happy.

      That said, I think config files are fine how they are. Sure, the formats are different, but few are actually hard to understand (and if they are, its the developers problem). Having most configuration files in /etc/ is enough. Its just a quick look through there for what I need. Perhaps a registry-like (but obviously much better/faster in the way of linux) thing would be good for some parts, but forcing developers to use something is not the right idea.
    2. Re:How about changing the GPL? by GigsVT · · Score: 1

      You sure seem to have a lot of suggestions for someone who still thinks binaries should go into /etc.

      I think you should go read the FHS before giving half-baked ideas.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    3. Re:How about changing the GPL? by pyite · · Score: 2, Interesting

      Or he could always visit the Half Bakery.

      --

      "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

    4. Re:How about changing the GPL? by WebHostingGuy · · Score: 1

      I think you missed the point--from the original post:

      "The best way would be to set up a standard and then begin to push the agenda across the linux distributions asking them to ask the developers to abide by the standard."

      The rest was not meant to be serious...

      And yes, I have seen programs want to install binaries in /etc as part of their normal configuration, hence the problem and I believe the reason for the question.

      --
      Quality Hosting e3 Servers
  14. Could be a job for diff and patch... by jonadab · · Score: 1

    If the system were to keep around the unedited original versions of each config file, then on update it could diff your edited version against that, creating a patch, which it could attempt to apply to the new version. (If the patch does not apply cleanly, of course, then you still have to hand-merge, but I suspect that in the majority of cases the lines the user has changed will not be the lines that have changed in the new version. For instance, in http.conf a lot of us only change a couple of basic things, like DocumentRoot and such, and for most upgrades the patch would apply cleanly, unless the app has made major changes to the config file (e.g., between Apache 1.x and 2.x). I have changed just one thing in wgetrc (to make it do passive ftp, since I'm behind a NAT gateway) -- that should apply cleanly almost no matter WHAT the wget people do to the next version of the config file, I would think.

    I'm not entirely sure where the unedited originals should be kept; perhaps in a separate hierarchy of their own (e.g., /etc-originals) or perhaps right beside the in-use config files, with a .orig suffix added or something.

    Besides /etc, ~/.* should probably be handled much the same way.

    --
    Cut that out, or I will ship you to Norilsk in a box.
    1. Re:Could be a job for diff and patch... by GigsVT · · Score: 2, Interesting

      That is an interesting proposal, a CVS like merge for config files.

      The problem I see is the same sort of thing that CVS fails at, logical inconsistancy.

      Suppose I have added foo=off at the top of the file, and the new config adds a default for foo, foo=on at the bottom. I'm sure going to be shocked when I'm exploited through the foo unicode vulnerability I didn't know I was subject to!

      You get the idea. :)

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
  15. perhaps... by Lord+Bitman · · Score: 0, Redundant

    Perhaps if there were some sort of "registry", to which all configuration information could be added in a common format, which any program could access or modify...

    --
    -- 'The' Lord and Master Bitman On High, Master Of All
  16. Messes are inevitable by squiggleslash · · Score: 5, Insightful
    Whatever solution you come up with, it's unlikely to remain clean for long. I'm sure the inventors of the Windows Registry thought they'd come up with a clean solution, and I know the GConf people did too. Are they clean? Do you like them?

    I don't.

    Leave /etc as it is. It works. It's done the right job now for coming on 30 years. It's had one major clean up (executables moved to /sbin), and otherwise it's nice. You can grep it. Help is a manpage away. With the exception of a handful of recent apps from programmers who don't "get it" and think XML is better than simplicity, the config files are, by and large, consistant, within a certain mindset.

    There's lots of things that could be improved about Unix. Destroying /etc doesn't really improve it.

    --
    You are not alone. This is not normal. None of this is normal.
    1. Re:Messes are inevitable by Just+Some+Guy · · Score: 4, Informative
      I agree, with the exception that I think XML is infinitely preferable to some of the hand-rolled workalikes I've seen, and you can use a standard set of tools to parse any particular XML file sitting around.

      What's the conceptual differences between

      [TopSection]
      Setting1 = true
      Setting2 = yes
      Setting3 = no
      Setting4 = false
      and
      <section name="Top">
      <Setting1>true</Setting1>
      <Setting2>true</Setting2>
      <Setting3>false</Setting3>
      <Setting4>false</Setting4>
      </section>
      except that the latter can be browsed and edited with any editor that understands XML (as opposed to only Vim with the file-format-specific highlighter), can be deterministically validated by generic tools, and doesn't require the program's author to implement his own configuration file parser?

      XML isn't a perfect fit everywhere, but /etc is one of the places I think it works brilliantly.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:Messes are inevitable by Anonymous Coward · · Score: 0

      With the exception of a handful of recent apps from programmers who don't "get it" and think XML is better than simplicity, the config files are, by and large, consistant, within a certain mindset.

      Oh for heaven's sake, what's with the anti-XML bigots on Slashdot?

      How on earth are different syntaxes, with different (usually unspecified) character encodings, different (usually unspecified) character sets, that need different parsers consistent in any way whatsoever?

      XML gives a consistent syntax, with consistent error handling, a consistent character set, and offers standard means to specify and detect the character encoding. There are free, high-quality XML parsers available for practically every language ever invented, and masses of software to work with XML files.

      There's lots of things that could be improved about Unix. Destroying /etc doesn't really improve it.

      "Destroying /etc"? Be serious. At the moment, every single file in /etc reinvents the wheel, poorly. Asking what we can do to stop this mindless waste of developer and admin time is not "destroying /etc".

    3. Re:Messes are inevitable by walt-sjc · · Score: 4, Insightful

      One is clean and readable, the other wordy and cluttered. I hate xml config files. I don't WANT to be forced to use some bizzaro XML editor, or deal with manually edited XML.

    4. Re:Messes are inevitable by bairy · · Score: 2, Insightful

      This isn't flamebait, it's a good point. xml files are cluttered with tags (I might add the tags are usually longer than the data they hold). Standard ini-style files are easily editable by notepad without hassle, and it would be very easy to design an editor for them if people wanted one.

      --


      Get paid to search..It's geniune and
    5. Re:Messes are inevitable by Anonymous Coward · · Score: 5, Insightful
      Unbelievable. Just this little example you show demonstrates the utter insanity of XML.

      The XML version is harder to read than the .ini version. It's hard to tell at a glance if the config is a valid config. Would you really be able to spot an error in a closing tag, for instance?

      It is also harder to edit using command-line tools. It is harder to edit with ANY common unix tool, actually. You *must* use editors that understand XML (do you have editors like that on every machine by default? And no, syntax highlighting doesn't exactly count).

      How do you diff/merge? How do you push out changes to *some* of the values to your farm of 100 machines? Remember, your XML file can look like this too, and still be equivalent:
      <section
      name='Top'
      >
      <Setting1>true</Setting1< Setting2>true</Setting2>
      <Setting3
      >false</Setti ng3><Setting4
      >false</Setting4>
      </section>
      (the extra spaces here and there are /.'s doing)

      Say goodbye to the entire arsenal of simple well-established unix text-munging tools. Say hello to multi-megabyte XML parsers, just to slurp up key/value pairs.

      XML is definitely NOT what I'd want to see on my machines. Especially ones that are meant to be reliable.

      Here's how I would write that hypothetical program. I'd create a directory /etc/my-app/top. The "true" settings can be set like this:
      cd /etc/my-app
      touch top/setting1 top/setting2
      Done. Now my app can just check for the existence of the file as a true/false (or yes/no) flag. Do I need a new setting "top/send-alerts-to" that takes a string? No problem:
      cd /etc/my-app
      echo me@example.com > top/send-alerts-to
      Am I use a high-availability system? Here's how to do the above atomically:
      cd /etc/my-app
      echo me@example.com > top/send-alerts-to.tmp
      mv top/send-alerts-to.tmp top/send-alerts-to
      Do I need to synchronize this config with another machine? But not the "send-alerts-to" setting? No problem:
      rsync -a --exclude top/send-alerts-to /etc/my-app/ othermachine:/etc/my-app/
      Do I need to temporarily change the config and leave a comment for another admin? Here I go:
      cp -a /etc/my-app /etc/my-app.2005-03-02
      touch /etc/my-app/top/setting6
      echo "Temporarily activating top/setting6 because...." > /etc/my-app/README
      Want to merge changes? No problem, just use common version control tools like CVS, SVN, Darcs, whatever, that you probably already have laying around. You don't need a special XML merge tool.

      Want to quickly double-check a setting? Use grep, find, a GUI tool, whatever you want. NEVER underestimate the power of line-oriented text files. Searching XML with grep is a nightmare.

      Am I just showing off my 'leet command line skeelz here? No I'm showing how simple and flexible this scheme is. It's pretty hard to make the configs unparseable or inconsistent. They can be automated, or edited with vim, or whatever. Heck, in your XML examples, you have to type each tag *twice* (open/close)! Yeesh. That doubles the chance of mistakes, right there.
    6. Re:Messes are inevitable by neonstz · · Score: 1

      The difference is that I've written a error-checking, error-reporting parser and an easy to use interface for the first format in less than 50 lines c++.

    7. Re:Messes are inevitable by dtfinch · · Score: 1

      The first example has been used by tens of thousands of programs (granted, most are for Windows), is extremely human readable to even the computer illiterate, and is rather straightforward to deal with programmatically. The second is xml.

    8. Re:Messes are inevitable by adolf · · Score: 0, Flamebait

      [I was going to mod this as funny, but then I realized that at least two people already had, and that you weren't joking. So I'll just write something trite, instead.]

      Look, kid, nobody likes XML, even if it is buzzword-compliant. XML is so bad that every implementation of anything which uses it is solely focused on translating the XML data into some other form that is actually usable.

      Which is exactly what you're proposing: You suggest that the world convert the /etc heirarchy into a bunch of XML files which are so not useful by themselves, that they requires even more extra software just to interpret the shit.

      Just to make myself abundantly clear right away: I hope that you're trolling, else I implore you to hang yourself before you do any more damage to the world than you already have.

      In *nix, any configuration files are generally designed to be readable by humans. This is by design.

      XML, meanwhile, is hard to read. It is, to select a singular adjective, "noisey." I don't like listening to radio static, or watching snowy TV signals; why would I want to look at or work with similarly noisey configuration files?

      I use a generic tool every day called eyes, which works without installation on every UNIX-like machine that I've ever had to work on, including my Linksys router. Sometimes, my eyes don't work very well, but often contacts or glasses can help with that.

      So, I carry a set of eyes and contacts with me wherever I go. Aside from those, all I need are standard UNIX tools to get the job done.

      And my set of eyes has a much easier time parsing your first example than the second.

      Why do you desire to take away my tools and replace them with the moral, conceptual, and visual equivilent to regedit? Is one coder's time worth the agony of the entire unix-using world?

      I've got a Windows box in the next room for when I want to deal with that shit, and it is a loathesome day when I have to edit the registry for, well, anything. And it's not even so much the horrid organization which I dislike, but the visual presentation: Locked down and difficult to navigate, just like XML mandates.

      Go fuck yourself. HAND.

    9. Re:Messes are inevitable by Ogerman · · Score: 1

      XML is the wrong approach, partly for the reason you mentioned. Head over to Elektra's website, http://elektra.sf.net and find out why their idea is so much better than both /etc and XML alternatives.

      Now one thing you must consider, however, is that XML meta-data would be a good thing. It would allow you to edit your flat files in an Elektra hierarchy any way you wish, but it would also allow for rich, self-describing config trees easily managable with a rich GUI admin tools.

    10. Re:Messes are inevitable by Ogerman · · Score: 1

      Why do you desire to take away my tools and replace them with the moral, conceptual, and visual equivilent to regedit? Is one coder's time worth the agony of the entire unix-using world?

      I don't know how everyone got off on this silly XML tangent. Head over to http://elektra.sf.net to find a Unix-admin friendly alternative to /etc that actually makes sense.

      Elektra + optional XML meta-data now!

    11. Re:Messes are inevitable by Ogerman · · Score: 1

      Leave /etc as it is. It works. It's done the right job now for coming on 30 years.

      It works. It's far better than Windows registry. But it can be improved and this is what the Elektra project mentioned in the topic is all about. Unfortunately, it appears that nobody posting to this thread has actually read about the idea. (as usual.. skip the article and jump into a flamewar) Everyone just assumes the only alternative to /etc is some sorta hideous XML jungle.. or a special daemon reliant mess like GConf that adds no value.

      Elektra + optional XML meta-data now!

    12. Re:Messes are inevitable by Anonymous Coward · · Score: 0
      "One is clean and readable, the other wordy and cluttered. I hate xml config files. I don't WANT to be forced to use some bizzaro XML editor, or deal with manually edited XML."



      1. User
        --------
        Editor
        --------
        File
        --------
        Machine



      Now unless the "user" is dealing directly with "file"* an "editor" is needed. The implications of this is that "clean and readable" verses "wordy and cluttered" is a function of the "editor". The actual nature of the "file" is irrelevent. Just like the differnces between the x86 and the PPC are irrelevent at a certain level. Chose your "editor". Mr "Bizzaro" Emacs, or "completely normal "Vim". And does anyone really want to "manually edit" their assembly language?

      Important Stuff Lameness filter.

      # Please try to keep posts on topic.
      # Try to reply to other people's comments instead of starting new threads.
      # Read other people's messages before posting your own to avoid simply duplicating what has already been said.
      # Use a clear subject that describes what your message is about.
      # Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)
      # If you want replies to your comments sent to you, consider logging in or creating an account.

      *Think hexeditor.
    13. Re:Messes are inevitable by adolf · · Score: 0, Flamebait

      If everyone is off on some XML tangent, that must mean that everyone hates it.

      On with Elektra. Here's the problems they state with the Way Things Are Done, along with their requisite Standard Rebuttal:

      They don't have a common file format.

      So what? They're different programs, written by different people, and doing different things in different ways. Of course they use different file formats for configuration.

      Their location in the filesystem may be different from Linux distribution to distribution.

      Yes. This is why they're called *different distributions.* If you want sameness, one could always run OSX on unremarkable Apple hardware.

      When two different softwares want to integrate themselves, it is programatically very hard to read, understand and correctly change its partner's configuration file. Think about installing a third-party video driver in XFree86, a new Apache plug-in, etc, and letting this new piece of software do the integration automatically, instead of the sysadmin vi the configuration file, understand and change it in the right way. So basic software integration is a pain today for ISVs (Independent Software Vendors).

      Would someone PLEASE show me a video driver which requires an Apache plug-in? I want the head of the maintainer.

      And ISVs don't want their job made easier, or else they'd find themselves without one. Next.

      A software developer must waste a lot of time to write the plumbing code for configuration file parsing etc. It is completelly out of his scope to write code to interoperate with other software's configurations files.

      Right. It's right at the beginning, and easy enough to reuse if one is sticking with the GPL. Not Difficult.

      Different distributions tend to place different software configuration in different places with different formats. A regular SuSE system administrator, for example, will be lost when asked to work in a Debian or Slackware system. Think about the most primitive example: network configuration parameters. Each distro has its own approach.

      Shucks. You mean that HP/UX is different from Solaris? And all this time, I thought they named them differently for marketing purposes.

      A system administrator must know all these formats.

      That's why they're self-documenting and human-readable.

      There is no way to know today what was changed in a specific configuration file. If /etc/shadow file time changes, there is no way to know if the change was related to nobody's or root's record.

      Backups, backups, backups. Has nobody yet learned the purpose of a proper fucking backup regime? It's not just to recover from hardware failure, but to provide a window into the past. Snapshots, with FreeBSD and NetApps filers, make this easy. LVM snapshots under Linux are a bit more murky, but that's not LVM's fault, let alone /etc/shadow's.

      Storage is cheap, and the components are there. Why hasn't anyone figured this out yet?

      High-level system administration GUIs (webmin, redhat-config-*, SuSE's YAST, etc) are just a dream today. They can never track successfully all the changes that happens in the format of the configuration files of such a rich diversity of Open Source software (httpd.conf, smb.conf, modules.conf, fstab, etc, etc, etc). The approach of some of them is to keep the configuration ideas in a private database and regenerate the specific configuration file whenever a change happens in this database. Welcome to the inconsistency nightmare.

      Webmin, and all of its evil little friends, consists of a crutch for those who want to operate UNIX machines, but don't want to learn more than Windows 95 taught them. That's not UNIX, and I therefore don't give a shit. Nor will any other administrator who knows the difference between csh, bash, ksh, less, and more.

    14. Re:Messes are inevitable by drsmithy · · Score: 1
      One is clean and readable, the other wordy and cluttered. I hate xml config files. I don't WANT to be forced to use some bizzaro XML editor, or deal with manually edited XML.

      Ideally you wouldn't be editing them directly, but changing values through a *configuration editor* that provides input validation and sanity checking, contextual documentation, revision control, etc.

    15. Re:Messes are inevitable by klui · · Score: 1

      As opposed to the first example where it can be edited by any editor, regardless if it understands XML or not. Seriously, just because an XML file is valid doesn't mean an application is guaranteed to understand it.

    16. Re:Messes are inevitable by Yokaze · · Score: 1
      And in the latter, I can and have used at least one parser in more than 3 different programming-languages in less than 50 lines, which not only was error-checking and error-reporting, but also handled various natural languages in their abundent encoding transparently.

      And now to the features: Did your 50 lines parser error-checking included checking for required fields? Or value-validation? Or realised hierarchies? Or dependencies? Multi-byte character support?

      If you'd restrict yourself to the feature-set you usually get from using an INI-style format, so only use the following format in ASCII, like.
      <Section
      Name0=Value0
      Name1=Value1
      >
      ?
      I guess such a parser could be written with a similar source-footprint.

      However, should the need arise for more complex requirements in the configuration file, it would be nice not to be limited by the expressiveness of the INI-syntax, or be required to create some kludge by extending the syntax with the like of
      [section.subsection.usernamed section]
      reference=othersection.usernamed section 2
      --
      "Between strong and weak, between rich and poor [...], it is freedom which oppresses and the law which sets free"
    17. Re:Messes are inevitable by claes · · Score: 1

      XML is better than ini file format when expressing hierarchies, but your example does not illustrate that

    18. Re:Messes are inevitable by anpe · · Score: 2, Interesting

      You might want to read Esr's Art of Unix Programming, specially chapter 5 on data formats
      Here's what he says about XML files :
      The most serious problem with XML is that it doesn't play well with traditional Unix tools. Software that wants to read an XML format needs an XML parser; this means bulky, complicated programs. Also, XML is itself rather bulky; it can be difficult to see the data amidst all the markup.

    19. Re:Messes are inevitable by Just+Some+Guy · · Score: 1
      It is also harder to edit using command-line tools. It is harder to edit with ANY common unix tool, actually.

      I guess I don't see how "tag: value" is inherently easier than "<tag&gtvalue</tag>".

      By the way, one of the nice things about standardizing on a common file format - be it XML, INI, or whatever - is that you could programmatically roll out those updates with code like:

      for host in hostlist:
      ....config = ConfigParser('sftp://root@%s/etc/foo' % host)
      ....config['Section1']['serverhost']['port' ] = 587
      ....config.write()
      which is a lot easier than the current "SSH to each host and execute a one-off custom script to edit the file in-place" method, at least in my opinion.

      Say hello to multi-megabyte XML parsers, just to slurp up key/value pairs.

      ...as opposed to the current situation where each and every program has its own hand-written parser that's not quite compatible with anything else. Frankly, the idea that program foo could become a program that just does bar instead of a bigger program that does bar after reading a foo-formatted config file seems rather Unix-y to me.

      Shared libraries are a good thing, right? Then why do we refuse to use them in this one particular area of system administration? After all, we don't all write our own socket code or printf(), so why must we each write our own configuration parser?

      --
      Dewey, what part of this looks like authorities should be involved?
    20. Re:Messes are inevitable by squiggleslash · · Score: 1
      Remember I made the criticism of programmers who think XML is better than simplicity? You kind of demonstrated the issue with your example. Not only is what you wrote harder to read than the equivalent ".INI", but it's actually only a small portion - there's the XML headers to take care of too.

      XML is cluttered and complicated. It is possible to "cleanly" express some content types better in XML, but for the vast majority of cases, it's overkill and unnecessary added complexity. What's worse, it's not even a real "solution" to complex data - complex data is rarely limited to information best expressed textually.

      I make no secret of not liking XML. I'm not saying it's never appropriate, but most of the time, when I see it, you've got to wonder what crack the user was smoking when he or she chose it. It's a modern day programmers fetish that's inappropriate for most of the applications it's used for.

      --
      You are not alone. This is not normal. None of this is normal.
    21. Re:Messes are inevitable by squiggleslash · · Score: 1
      Oh for heaven's sake, what's with the anti-XML bigots on Slashdot?
      You need to see a doctor about that jerking knee of yours.

      XML is a good solution for a small set of particular formats. For everything else it's either overkill or too limited.

      XML is being treated right now by a lot of programmers as the be-all and end-all solution to everything. It isn't. It's difficult to parse for otherwise lightwieght programs, it's difficult to read, and it's verbose. If you doubt this, try converting, as an example, fstab to XML. It's deceptively easy and the solution is apparently obvious.

      Then, once you've done that, play around with it. Consider the consequences of what you've just done. Can you get the entire file system to appear on part of one screen any more, like you could the old fstab? Can you easy, at a glance, see the settings related to /mnt/cdrom?

      Now consider all the programs that use fstab. Do you really want to rewrite "mount" in C++? You're not going to be able to rewrite it in Python, it's too low level. And if you keep it in C, it's going to be a PITA to actually parse that fstab file.

      Suddenly this classic example of a "horrible" old-style configuration file doesn't look so bad, does it?

      I'm not an XML bigot. I'm a realist. I appreciate it annoys the thought-free fan-boys who jump on a new technology, see some tiny part of it that looks good, and suddenly enthuse about how it can revolutionise everything, but just as OOP is a great way of writing interactive GUI-based apps, but pretty ugly the further you get away from that, XML is a great way of expressing certain types of complex hierarchical textual information, but pretty ugly the further you get from that. If it's simple, you don't want to express it in XML.

      --
      You are not alone. This is not normal. None of this is normal.
    22. Re:Messes are inevitable by Anonymous Coward · · Score: 0

      XML is being treated right now by a lot of programmers as the be-all and end-all solution to everything.

      And I disagree with that. But at the opposite end of the spectrum, you have people moaning about all sorts of stupid little things and finding any reason they can to dismiss XML. Slashdot happens to be full of these people, and by taking the (completely indefensible as far as I can possibly tell) position that /etc is "consistent", you appear to be one of them.

      It's difficult to parse for otherwise lightwieght programs, it's difficult to read, and it's verbose.

      I hear "difficult to parse" a lot. Why aren't you using an off-the-shelf parser? Not having to write a parser is one of the benefits of XML!

      As for difficult to read, well, sorry, that's a matter of taste, and there are more than enough people that disagree with you. You can't use that as an objective reason to dismiss XML.

      Verbose? Perhaps. Again, a matter of taste. I personally find XML much more readable than whitespace delimited files for most purposes.

      Can you get the entire file system to appear on part of one screen any more, like you could the old fstab?

      I can't figure out what you mean by this. Getting the filesystem to appear on part of a screen? What?

      Can you easy, at a glance, see the settings related to /mnt/cdrom?

      Sure. You do know XML is human-readable, right? Some morons on Slashdot like to post things like "you need special software to edit XML, I want vi!", so it's obvious not everybody who likes to criticise XML has a clue about it.

      Now consider all the programs that use fstab. Do you really want to rewrite "mount" in C++?

      XML doesn't require C++, so that question isn't even on the table.

      You're not going to be able to rewrite it in Python

      Again, switching languages just isn't necessary.

      And if you keep it in C, it's going to be a PITA to actually parse that fstab file.

      Why? One basic model for pulling values out of an XML config file is this:

      1. Instantiate parser.
      2. Plug in file.
      3. Plug in XPath expression.

      That's it. It's trivial.

      Suddenly this classic example of a "horrible" old-style configuration file doesn't look so bad, does it?

      No, you are wrong, it still looks like needless wheel reinventing. And you forgot to multiply that "classic example" by... ~200 config files in my /etc (with virtually no shared syntaxes).

    23. Re:Messes are inevitable by Anonymous Coward · · Score: 0

      Look, your ignorance is embarrassing to see. You can edit XML with notepad, vi, emacs, any text editor you like. It doesn't need to understand XML. This is practically the first thing anybody learns about XML. How can you be so ignorant and yet still feel like you can participate meaningfully in a conversation, let alone dismiss something you don't know the first thing about?

    24. Re:Messes are inevitable by squiggleslash · · Score: 1
      I hear "difficult to parse" a lot. Why aren't you using an off-the-shelf parser? Not having to write a parser is one of the benefits of XML!
      Because we're talking about lightwieght programs. Programs like "mount". "Off the shelf parsers" are generally not available in any usable form for non-OOP languages.
      As for difficult to read, well, sorry, that's a matter of taste, and there are more than enough people that disagree with you. You can't use that as an objective reason to dismiss XML.
      No, I can. XML is difficult to read because the data is mixed with verbose, redundant, information. Now, I actually gave you an example. I suggested you write an XML equivalent of the fstab file. Don't pretend I wasn't being objective here!
      I can't figure out what you mean by this. Getting the filesystem to appear on part of a screen? What?
      cat fstab

      Now cat your XML equivalent.

      Sure. You do know XML is human-readable, right? Some morons on Slashdot like to post things like "you need special software to edit XML, I want vi!", so it's obvious not everybody who likes to criticise XML has a clue about it.
      Did I say it wasn't? I was comparing the two, and pointing out that the simpler design is the more readable.

      cat fstab, and at a glance you can see everything about /mnt/cdrom. It takes a second to find the line refering to it and understand how /mnt/cdrom is set up.

      cat "fsxml", on the other hand, and you'll have to plough through a large amount of what's essentially garbage to find the text you're looking for. Now, before you reply, please, do what I'm suggesting. Take your fstab file and convert it to the most obvious form of XML. It's not difficult. It'll take you five to ten minutes. Once you've done this, we'll be on the same page. You'll see instantly what I'm refering to. You'll see you can no longer easily see, at a glance, the information you're trying to find. You'll no longer be able to fit it on one screen.

      The format of fstab is hardly wonderful, but compared to XML it is instantly, easily, readable.

      For the specific application of listing available file systems in a Unix environment together with their security and mounting attributes, fstab is a more optimal solution than XML.

      XML doesn't require C++, so that question isn't even on the table.
      Technically it's possible to write an XML parser in regular C. It's hard. It's complicated. It's difficult to do without producing a complex, difficult to maintain, large program.

      Realistically, you wouldn't do it.

      And if you keep it in C, it's going to be a PITA to actually parse that fstab file.
      Why? One basic model for pulling values out of an XML config file is this:
      1. Instantiate parser.
      C, not C++. C. You can't "instantiate" instances in C. It has no concept. That's the point.
      No, you are wrong, it still looks like needless wheel reinventing. And you forgot to multiply that "classic example" by... ~200 config files in my /etc (with virtually no shared syntaxes).
      I'm surprised anyone would describe it as "reinventing the wheel". XML came after the CSV or white-space delimited file. XML is infinitely more complex, is objectively harder to read, and objectively more difficult to implement. While off-the-shelf libraries provide a semi-solution to the latter, XML's complexity and required Unicode support means that it's a bugger to use for simpler languages like C.

      Asserting it isn't, and then quoting what you'd do in C++ and pretending it's the same in C as a justification, ignoring (deliberately?) an objective, relevent, example, and - irony of ironies - complaining that white-space delimited files are "reinventing the wheel" as if to pretend XML isn't, strikes me as not very convincing.

      Implement my example. For shits and giggles, feel free to modify the mount command to support it (you'll have to learn C first though) before responding. I think you'll see my point.

      --
      You are not alone. This is not normal. None of this is normal.
    25. Re:Messes are inevitable by squiggleslash · · Score: 1
      I don't think anyone's arguing there's never a reason to use XML. The issue is more that there's a mentality at the moment that XML is the solution to everything.

      Sure, you can store extremely heirarchical data in XML. Sure you can store Unicode in XML too. But what if, say, you're storing relatively simple information that doesn't really have either of those issues?

      In response to an AC below, I suggested the fstab as an example of a file that really shouldn't be rewritten in XML. The advantages and disadvantages of both approaches would be:

      fstab:

      Easily parsed by any language, OOP or otherwise. C and shell scripts can easily parse it.

      Catting it generally results in less than a screenful of information (any verbosity is usually down to copyright notices), meaning that all the information a sysadmin needs is available at a glance.

      Easy to manually scan - finding /mnt/cdrom is a matter of glancing down the first column. All related information to it is thus on the first line. You can answer the question "Is /mnt/cdrom mounted upon boot?" in a second or two.

      "fsxml"

      Can be parsed by a standards compliant library, but such libraries are not available in a form easier to use than manual scanning of fstab for lower level HLLs like C.

      Can be validated automatically, though testing validity is easy for fstab as mount can be run manually and will complain about problems.

      Is potentially self documenting, assuming obvious tags are chosen, though comments above column headings in fstab makes this redundant.

      The key thing with fstab, of course, is that mount, a simple C program, and some start up scripts, written (of course) in Bourne Shell, need to read it. That's pretty much the clincher - and it's true, actually of a lot of files in /etc. It needs to be simple, and XML isn't just overengineered for the purpose, it's positively unsuitable.

      If XML is as great as its more enthusiastic supporters suggest, then Oracle needs to be rewritten so its tables are stored in XML. Its indexes too. ELF needs to be discarded in favour of XML. File systems like ext2fs and ReiserFS need to be replaced with XML too.

      Clearly that's over the top, and no supporter, no matter how enthusiastic, really would suggest such a thing (though I wouldn't put it past someone to suggest replacing ELF...), but the point is that it really isn't suitable for every application. More to the point, it's not an optimal solution (like all portable, extendable, generic formats) for the vast majority of applications. It's a useful solution, but it's not even the only portable, extendable, format, and those who propose it knee-jerk for everything are doing a grave disservice to the format itself.

      --
      You are not alone. This is not normal. None of this is normal.
    26. Re:Messes are inevitable by drinkypoo · · Score: 3, Insightful

      Hahahaha!

      I guess I don't see how "tag: value" is inherently easier than "<tag&gtvalue</tag>".

      You might not be able to see how, but thanks to your example, the rest of us have had an excellent demonstration.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    27. Re:Messes are inevitable by Anonymous Coward · · Score: 0

      Because we're talking about lightwieght programs. Programs like "mount".

      Programs like "mount" use external libraries.

      "Off the shelf parsers" are generally not available in any usable form for non-OOP languages.

      Bullshit. There have been XML parsers for C for years. Expat's quite popular.

      XML is difficult to read because the data is mixed with verbose, redundant, information.

      Verbosity and redundancy often increase the readability of something. Furthermore, because XML is a regular syntax, my editor can do automatic syntax highlighting, which makes it even more readable. The same thing isn't feasible for hundreds of different formats.

      Now, I actually gave you an example. I suggested you write an XML equivalent of the fstab file. Don't pretend I wasn't being objective here!

      You aren't! Even with a concrete example, what one person considers to be readable differs from what another person might consider to be readble. Do you seriously not get this?

      cat fstab

      Now cat your XML equivalent.

      I still don't see your point.

      Did I say [XML wasn't human-readable]?

      If you know that it is, why did you ask if you can see the settings for /mnt/cdrom by looking at it?

      cat fstab, and at a glance you can see everything about /mnt/cdrom. It takes a second to find the line refering to it and understand how /mnt/cdrom is set up.

      No. What's the trailing two zeroes on the line? I can't remember off the top of my head, and even if I did, I wouldn't remember which way around they went. I need to check the man page for yet another custom syntax. Multiply that by 200.

      Now, everything you say about "cat fstab" applies to "cat fstab.xml", except now it doesn't matter which order I put them in, and the syntax is descriptive.

      cat "fsxml", on the other hand, and you'll have to plough through a large amount of what's essentially garbage to find the text you're looking for.

      This is what I mean by "people moaning about all sorts of stupid little things and finding any reason they can to dismiss XML".

      You honestly think that things like <device> constitute "large amounts of garbage"? Because from where I'm standing, it looks awfully like you are grasping at straws and exaggerating problems to try and find a reason to criticise XML.

      You'll see instantly what I'm refering to.

      Thank you, but I work with XML all the time, and I don't see what you are referring to. It's very condescending of you to assume that I consider XML to be readable because I just haven't seen an XML file.

      For the specific application of listing available file systems in a Unix environment together with their security and mounting attributes, fstab is a more optimal solution than XML.

      You aren't seeing the forest for the trees. Perhaps if fstab was the only instance of a config file on a system, there would be a point to inventing a syntax and writing a custom parser.

      But there are hundreds of instances of this happening! They all need to store small amounts of largely textual, often hierarchical data. XML offers a solution to all of them. Even if it's not the most optimal solution for a single instance of the two hundred-odd configs on my system, it's the most optimal solution for all the instances put together.

      Technically it's possible to write an XML parser in regular C. It's hard. It's complicated. It's difficult to do without producing a complex, difficult to maintain, large program.

      Who cares? It's already been done. You don't have to do it. I don't care how easy you think it is to write a parser for a custom syntax, it's not as easy as avoiding writing the parser altogether.

      You can't "instantiate" instances in C.

      Of course you can. "Instantiate" simply

    28. Re:Messes are inevitable by Anonymous Coward · · Score: 0

      Sorry, try again. It's just as easy to omit the colon in tag: value as it is to omit the semicolon in entities. Oh but wait - XML has defined error handling and easy ways of detecting the error, and your format-of-the-week doesn't.

      But go ahead, pick on an irrelevent typo instead of addressing his real point. That's *bound* to convince people that you have a valid argument.

    29. Re:Messes are inevitable by pyrrhonist · · Score: 1
      That's why they're self-documenting and human-readable.

      One word: sendmail.cf

      --
      Show me on the doll where his noodly appendage touched you.
    30. Re:Messes are inevitable by moonbender · · Score: 1

      Two times the characters, two times the chance to make a typo.

      --
      Switch back to Slashdot's D1 system.
    31. Re:Messes are inevitable by adolf · · Score: 1

      One acronym: RTFM.

      That you haven't taken to time to grok m4, does not a bad configuration system make. At least at some point, the stuff that comprises sendmail.cf is a very human-readable and easy to read m4 script, which is still way better than XML as a be-all, end-all solution.

      Editing sendmail.cf by hand is only needed when you're working Deep Magic. And Deep Magic is supposed to be difficult and arcane. It's called "job security."

      But it doesn't matter, anyway. Everyone knows that there's a number of better, easier, more flexible and more secure MTAs in the world. Those who still use sendmail are either:

      a) masochists
      b) sufficiently socially inept that they're unable to convey just how fucked sendmail is to the requisite PHBs and get them to mandate something else

      or

      c) both

    32. Re:Messes are inevitable by Ogerman · · Score: 1

      If everyone is off on some XML tangent, that must mean that everyone hates it.

      Fortunately everyone hates XML for system admin and that's not what Elektra is proposing.

      So what? They're different programs, written by different people, and doing different things in different ways. Of course they use different file formats for configuration.

      Elektra is not an attempt to change the way applications are configured. It is only an attempt to create a standard for how that configuration is stored so that it is more easily parsed. It doesn't force any radical change upon anyone. And, in fact, it would be trivial for programs to support both config formats as a compile-time option. Elektra is little more than placing each config line in a separate file and using filesystem hierarchy in place of indents, curly brackets or other means of designating blocks.

      Yes. This is why they're called *different distributions.*

      Variance in filesystem locations is not what gives value to having different distributions.

      Would someone PLEASE show me a video driver which requires an Apache plug-in?

      The text you quoted was giving multiple examples, not saying anyone would try to combine these things.

      And ISVs don't want their job made easier, or else they'd find themselves without one. Next.

      I suspect this is the root of your distaste for making *nix OS'es easier to manage/configure and the basis for the irrational arguments you are making. Consider this.. there will always be jobs for ISVs because there aren't that many folks smart enough to do the job right. You still have to understand the options you're setting whether you're using vi or a GUI interface. A new generation of admin tools will simply enable you to a.) handle more customers or b.) do less work.

      Shucks. You mean that HP/UX is different from Solaris?

      The point is not that OS'es can be made to be the same or use the same options. The point is that if everyone used the same config storage schema, it would be much easier to learn and keep track of multiple platforms / distros. Again, I think you're reading into their proposal too much.

      That's why they're self-documenting and human-readable.

      And also messy as heck, thereby reducing readability.. If you put all the information necessary to properly document a config schema in the file itself, there'd be a page or two between each option in many cases. Typically, many details are left out, forcing the admin to reference multiple external documentation anyhow -- there goes the self-documenting part. And how many times have you configured most of the software at the end of the file and then had to go back later and dig through the commented out examples because you forgot the syntax? And then a new version of the software changes some options and crap.. now you have to merge your messy config file with a fresh version with up to date comments. (But by this time you've probably given up on the self-documenting part and just deleted all the comments anyhow to make your settings readable)

      Backups, backups, backups. Has nobody yet learned the purpose of a proper *** backup regime? It's not just to recover from hardware failure, but to provide a window into the past.

      Backups are one option.. so is CVS. But how many times do you change more than one option per file per backup cycle or CVS commit? I agree this is one of the weaker arguments for Elektra, but it would increase granularity of revision records slightly. With admin tools that employ optional XML meta-data (stored in separate files, not part of the config!) you could easily implement a full history of changes for every option in the hierarchy. You could even devise an easy way of doing rollbacks of any change or groups of changes at any point in history without having to hastle with manual merging.

      Webmin, and all of its evil little friends, consists of a crutc

    33. Re:Messes are inevitable by jbolden · · Score: 1

      The very first line of sendmail.cf "DO NOT EDIT THIS FILE! Only edit the source .mc file."

      That's a perfect example. Sendmail wants a precompiled configuration file yet the format tells you this and tells you where to find the uncompiled version.

    34. Re:Messes are inevitable by DrSkwid · · Score: 1

      touch top/setting1 top/setting2

      Done. Now my app can just check for the existence of the file as a true/false (or yes/no) flag. Do I need a new setting "top/send-alerts-to" that takes a string? No problem:


      not a great idea, how does one know to touch the file

      having

      setting1=true # makes logging work
      setting2=false # supress syslog output

      is by far superior because I can see the flags and make commentes etc.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    35. Re:Messes are inevitable by pyrrhonist · · Score: 1
      The very first line of sendmail.cf "DO NOT EDIT THIS FILE! Only edit the source .mc file."

      Guess what? It didn't used to be that way! You used to have to change the sendmail.cf file by hand. I have done this many times before m4 support was added, so my point is still valid.

      --
      Show me on the doll where his noodly appendage touched you.
    36. Re:Messes are inevitable by pyrrhonist · · Score: 1
      One acronym: RTFM. That you haven't taken to time to grok m4, does not a bad configuration system make.

      That's the point. You have to edit a program to modify a configuration file. That is messed up.

      Why do you automatically assume that I haven't used m4 for sendmail configuration? Just because I have a different opinion of you does not mean that I am unfamiliar with it. You don't have to be condescending.

      I've been using sendmail since before they used m4, and I have had to edit the sendmail.cf file by hand. I was annoyed when they went to m4, because that meant I had to install new software and learn a new syntax instead of just popping in and changing the lines I needed. Furthermore, the configuration files weren't even in /etc anymore.

      At least at some point, the stuff that comprises sendmail.cf is a very human-readable and easy to read m4 script, which is still way better than XML as a be-all, end-all solution.

      No, it isn't. It's not even much less verbose than a well written XML file. Besides, you should not have to edit a script to change a configuration file. Furthermore, application generated files not editable by the user should not go in /etc.

      And Deep Magic is supposed to be difficult and arcane. It's called "job security."

      No, it's called, "an accident waiting to happen", and if you think that just because you can do something difficult it means that you have job security, you are fooling yourself. There are plenty of people that can do that same arcane thing faster and cheaper than you can.

      a) masochists

      Why do you say that? You said that the configuration files were, "very human-readable and easy to read". Should be a snap.

      sufficiently socially inept that they're unable to convey just how fucked sendmail is to the requisite PHBs and get them to mandate something else

      There you go with the attitude again. Obviously if sendmail is company policy, then the administrators must be socially inept, because they haven't convinced their boss to switch to postfix. That's a crock of shit, and you know it.

      --
      Show me on the doll where his noodly appendage touched you.
    37. Re:Messes are inevitable by adolf · · Score: 1

      To summarize and enumerate and reply:

      1. sendmail.cf is not meant to be human-readable, any more than an ELF binary is. It's meant to be readable by sendmail.

      2. sendmail's m4 config scripts are very human readable, and way less noisey than XML.

      3. You're not attempting to argue that Deep Magic is supposed to be easy, are you? Because if it were, it wouldn't be Magic, let alone Deep Magic.

      4. Yes, the entire world should be aware that sendmail is fucked, by now. I stand by my assertions as to why it might still be in use. Attitude or no, I believe it to be true.

      And finally: I agree that there should not be non-human-modifiable files under /etc. While we're at it, other machine-generated stuff like aliases.db should be moved out to somewhere else, too.

    38. Re:Messes are inevitable by adolf · · Score: 1

      I think what you meant to say was: "...my point was valid years and years ago."

      Thanks for playing.

    39. Re:Messes are inevitable by adolf · · Score: 1

      UNIX ceases to be UNIX when it doesn't feel like UNIX anymore.

      I define UNIX as a set of simple, standardized tools (awk, sed, man, cat, and friends), and a way to tie them together (the shell), along with a multitasking, multiuser enviroment, and simple configuration that can be handled from a teletype.

      Webmin presents none of these things. It is therefore not UNIX. With Webmin, and its ilk, it doesn't matter that the system is all running under the Linux kernel.

      The end user is never exposed to the things that make a UNIX machine a UNIX machine. It is therefore, for all purposes, not a UNIX machine. It might as well be running under Win2k3 with cygwin.dll.

      I am vehemently against even the mere dilution of anything UNIX. I like the system, and I (a user, an administrator) have an easier time using it efficiently than I ever have anything else.

      I am motivated in this effort by fear, but it's not at all irrational. I simply do not desire to wake up one day and find that someone has taken away everything I recognize as UNIX, and turned it into something which is only usable with a mindless point-and-drool interface that has been deemed "easier."

      I am particularly opposed to any changes that consist of a database for configuration data, even if that database does successfully masquarade as a directory tree. The world is currently cursed with the misuse of complicated databases, where they present no clear advantage over human-readable text.

      Because in order to use that database, I need interface software. And in order to use that interface software, I have to abandon the UNIX ways of doing things that I know and love.

      I've used most of the "advanced" user interfaces for computers which have evolved over the past twenty years, and still find myself going back to this ancient, obscure text-based "UNIX" thing which was initially developed to operate, of all things, telephone switches.

      I don't care if it'd be trivial to support both old- and new-school config files. It's more trivial than that just to leave it the hell alone.

      Unless you've got actually got something substantially better (and believe me, it's been tried), please focus your efforts elsewhere.

      Or, please do as I said previously, and buy a Mac - it's already finished, and it's for sale, right now. I understand that the Apple Store is running a special this week, too: They'll double the amount of inanity in your Mac for free, just for asking.

    40. Re:Messes are inevitable by pyrrhonist · · Score: 1
      1. sendmail.cf is not meant to be human-readable, any more than an ELF binary is. It's meant to be readable by sendmail.

      Yes it is! That was the standard configuration syntax up until they switched to m4.

      2. sendmail's m4 config scripts are very human readable, and way less noisey than XML.

      They are no more or less human readable or noisy than XML:

      define('ALIAS_FILE','/etc/aliases')
      FEATURE(redir ect)
      <alias_file>/etc/aliases<alias_file>
      <redirect/>

      3. You're not attempting to argue that Deep Magic is supposed to be easy, are you? Because if it were, it wouldn't be Magic, let alone Deep Magic.

      No, I'm saying that you shouldn't depend on it, because there will always be somebody who can do it faster, cheaper, and better than you. Do not think for a moment that you are irreplacable because you know how to do something magical. Many of the things that were once Deep Magic have now been replaced by simple solutions.

      4. Yes, the entire world should be aware that sendmail is fucked, by now. I stand by my assertions as to why it might still be in use. Attitude or no, I believe it to be true.

      It does have a few, uh, issues don't it?

      --
      Show me on the doll where his noodly appendage touched you.
    41. Re:Messes are inevitable by pyrrhonist · · Score: 1
      I think what you meant to say was: "...my point was valid years and years ago."

      No, my point is still valid that the sendmail.cf is not user firendly. It's laughable that sendmail is probably the only application has to have its configuration file configured with another configuration file. It's insanity.

      Thanks for playing.

      There's no need to get snotty.

      --
      Show me on the doll where his noodly appendage touched you.
    42. Re:Messes are inevitable by adolf · · Score: 1

      *sigh*

      It is true that one needed to fondle sendmail.cf by hand, a Long Time Ago, and that it was not a fun time.

      But the only realistic scenario here is this: m4 has been around long enough that anyone not capable of using it at their location (because their sendmail was Really, Really Old) has probably already been 0wned, and been forced to upgrade or move to something different.

      sendmail.cf has moved on. It is not intended for human consumption. It states as much on the very first line of the file.

      For reference, see "past tense" and "present tense" in any good book on the English language.

      Thanks again.

    43. Re:Messes are inevitable by pyrrhonist · · Score: 1
      It is true that one needed to fondle sendmail.cf by hand, a Long Time Ago, and that it was not a fun time.

      Last time I had to edit sendmail.cf by hand was in 2000 on Solaris. I hardly consider that a long time ago. There were no m4 files for sendmail on that machine, and it was a new version of Solaris.

      sendmail.cf has moved on. It is not intended for human consumption. It states as much on the very first line of the file. For reference, see "past tense" and "present tense" in any good book on the English language.

      So what you're saying is that since people no longer edit the sendmail.cf file directly, it was never, ever at any time in the past meant to be user modifiable (also, the Holocaust never occurred).

      --
      Show me on the doll where his noodly appendage touched you.
    44. Re:Messes are inevitable by adolf · · Score: 1

      2000 -was- a long time ago.

      And a fully believe that you edited it by hand.

      I've done it, myself, last in 1998.

      In the present (which is right now, not henceforth from five years ago), that doesn't have to happen.

      I'm done now.

      Thanks again for your effort.

    45. Re:Messes are inevitable by Ogerman · · Score: 1

      UNIX ceases to be UNIX when it doesn't feel like UNIX anymore. ... Webmin presents none of these things. It is therefore not UNIX. ... I am vehemently against even the mere dilution of anything UNIX.

      Tools like Webmin can be installed and removed. They're optional. They're not part of the system. You can use them for quick and dirty changes and use your favorite shell and text editor for everything else. You can use them as training tools for new admins so they can get used to the configuration needs before they see what's really under the hood. So I'm not sure how you feel that the mere existance of tools which make Unix easier to admin for the majority somehow take away from its power when you use it. Look at it this way: We who are the old school Unix junkies will always be in the minority because most people simply aren't smart enough to do things the way we do. But would we rather them use Windows or use Unix with a candy-coated shell that we can easily peel away if we need to fix their machines?

      I simply do not desire to wake up one day and find that someone has taken away everything I recognize as UNIX, and turned it into something which is only usable with a mindless point-and-drool interface.

      You keep using words like "only usable" and "taken away" but nobody is doing this or even attempting to do this -- with the exception of MS who has done it already, but not to Unix.

      I am particularly opposed to any changes that consist of a database for configuration data, even if that database does successfully masquarade as a directory tree.

      You could easily call the /etc filesystem a "database." It's just not as granular as breaking large files down into many smaller ones. We're talking about the difference between whitespace and filesystem nodes for separating options. It's the same data. It's the same schema. It's just stored with more pointers.

      The world is currently cursed with the misuse of complicated databases, where they present no clear advantage over human-readable text.

      No doubt there are many examples of databases gone wrong -- complication that adds no value. In the vast majority of cases, however, it's not that flat text would have been ideal. It's the fact that the database designers didn't really think about what they were doing and so the result became worse than just using flat text.

      Because in order to use that database, I need interface software. And in order to use that interface software, I have to abandon the UNIX ways of doing things that I know and love.

      By definition, passwd is a database. You can edit it by hand or you can use an interface like adduser. But you would certainly not argue that the person who wrote 'adduser' is out to destroy the Unix way of doing things.

      Unless you've got actually got something substantially better (and believe me, it's been tried), please focus your efforts elsewhere.

      Do you really honestly believe that there is no room for improvement in our "Unix" way of doing things and that it will exist forever? And therefore we shouldn't try anything new? I mean.. I'm sure there were folks who swore by hand wiring their computer's logic because it gave them more control than early micro-chips. But there's a certain over-arching concept in the whole world of computing that abstraction eventually makes technology more powerful. Lets say that a new generation of admin tools actually works at some point. Suppose it actually becomes much faster, safer, and powerful to configure your Unix system from a GUI. You can accept this and say to yourself, "well.. this does actually work.. and now I have more free time to try completely new things." Or you can say, "Heck with this.. I'm doing things the old way even if they are inferior" and eventually lose your job as everyone else moves on. I'm not claiming this is just around the corner, but it will

    46. Re:Messes are inevitable by walt-sjc · · Score: 1

      Um, as I said, I don't WANT to edit them with some bizzaro configuration / XML editor. I want to be able to make quick manual changes through a text interface. I want to be able to easily cut and paste these changes, do global search and replace, add descriptive comments, easily comment out sections, etc. Configuration editors don't allow you to do that. The last thing I would want in Unix is anything resembling regedit whether it be a GUI or curses style text.

      I've seen dozens of configuration editors for Apache for example. NONE of them are as quick and easy to use as vi (or emacs). NONE of them allow you full control over all options. None that I saw have the ability to "comment out" a section, and very few create backup files. Even fewer allow you to create multiple backup files and specify a descriptive name for it.

      Gnome is a prime example. Many settings have custom GUI's to edit them, but when the option isn't in the gui you need to drop down to gconf-editor or worse, gconftool. No thanks, I'll just hand edit the conf files. Easier to find, make backups, etc.

      Ditto for sendmail, exim, proftpd, sshd, named, ldap, samba, and so on. You cannot escape manual file editing unless you are dealing with simplistic configurations. Despite the 400-level deep GUI options for networking in Windows, you still need to drop down to the abortion-of-an-interface regedit waaaayyyy too frequently as everyone knows. Scripting mass changes is a nightmare.

      Just give me "easy to read" plain text files any day. Let me see all the comments including the ones *I* put in there.

    47. Re:Messes are inevitable by adolf · · Score: 1

      All that verbiage, but this substance sticks out. Verbatim, and complete, because it's good:

      Do you really honestly believe that there is no room for improvement in our "Unix" way of doing things and that it will exist forever? And therefore we shouldn't try anything new? I mean.. I'm sure there were folks who swore by hand wiring their computer's logic because it gave them more control than early micro-chips. But there's a certain over-arching concept in the whole world of computing that abstraction eventually makes technology more powerful. Lets say that a new generation of admin tools actually works at some point. Suppose it actually becomes much faster, safer, and powerful to configure your Unix system from a GUI. You can accept this and say to yourself, "well.. this does actually work.. and now I have more free time to try completely new things." Or you can say, "Heck with this.. I'm doing things the old way even if they are inferior" and eventually lose your job as everyone else moves on. I'm not claiming this is just around the corner, but it will happen someday so you might as well be ready for it.

      I would adore changes to the UNIX way which would help me do things faster, easier, and better.

      But, I anticipate that it is impossible without much more significant effort than has been happening.

      It boils down to this: None of this GUI stuff (including, for the sake of argument, clever ncurses hacks) uses any existing UNIX methodology for Getting Things Done, even though much of it is sitting right there under /bin waiting to be used.

      Instead, each and every time, the overtly-creative GUI artist creates their own set of tools, and their own requisite interface with which to use them.

      If the individual were to implement the flexibility of UNIX (and more; remember, it's gotta be an improvement or there's zero advantage) in their graphical configurator, then so be it - I'd jump ship immediately and start singing its praises.

      But to re-implement UNIX's functionality would be a daunting task, now wouldn't it?

      There is a clear divergence between traditional UNIX commands and more recent GUI modernisms. The two of them, seemingly as a rule, are anything but complementary.

      This is a problem. When operating my E16/Xorg/2.6.11 desktop, I find that nothing that I tend to click on has any relationship to anything that I tend to type.

      Every GUI application has its own silly user interface, with its own silly limitations. Repetitious actions abound for the simplest of activities, and my fingers (and mind) quickly grow tired of doing the same things over and over.

      Meanwhile, every text-mode application has the power of UNIX behind it. Text gets munged, pipes (with and without names) shoot data between what, until a few minutes prior, were completely unrelated programs. Work Gets Done, scripted in advance, while I fetch myself some more coffee. Efficiency.

      Thus, to summarize, if one wants to train the old-school away from traditional UNIX commands for daily activities, one must first make the new way at least as efficient of a system as the old way is, which will be very hard to accomplish and will involve much re-invention of hundreds of wheels.

      And inventing a new scripting language is probably not-so-good, either - else, I'd have been using GimpFU for automatic image resizing instead of of the ImageMagick and shell script mumbo-jumbo that I've been relying on for all these years.

      See, I don't want to learn GimpFU, even if it is better. I want to learn bash, and learn it well, ONE TIME. And then I want to proceed with getting things done, with JPEGs, and MP3s, and Postfix, a 3-gigabyte mbox, /etc, and everything else usable with a modern UNIX box.

      One might gain success with their efforts if they included traditional ways with their new GUI-esque efforts. But, AFAICT, this has never been done.

      I want to grep spoonboy | sed /

  17. Not really sure this is that big of a problem by np_bernstein · · Score: 1

    ./configure --prefix=/usr/local/-
    make && make install

    Don't get me wrong, I think there should probably be a "conf" directory in addition to an "etc" directory, but hey, if all packages pertaining to kerberos are in /usr/local/kerberos and all packages pertaining to postfix are in /usr/local/postfix who cares?

    Besides, most people don't follow conventions anyway, how much stuff is in /etc/ instead of /usr/local/etc/ anyway?

    --
    RandomAndInteresting.comdefending the world from stupidity since 1979
    1. Re:Not really sure this is that big of a problem by Alrescha · · Score: 1

      "Besides, most people don't follow conventions anyway"

      I think you have identified the source of the problem.

      Quips aside, When I was a boy the creator of the OS defined what went into /bin, /usr/bin, and so on. The administrator of the machine put stuff into /usr/local. This way when something broke you had a nice way of finding out who to blame.

      People have forgotten, never knew, or just don't care about stuff like that anymore. We all pay the price. Recently, I downloaded an OSS binary package (with an installer) for an OS X user-space application. On a hunch I looked at what and where it wanted to install - oops! "/usr/bin". I bypassed the installer and manually put the parts in /usr/local/bin. I shouldn't have had to do that.

      A.
      (offtopic rants a speciality)

      --
      ...bringing you cynical quips since 1998
    2. Re:Not really sure this is that big of a problem by ErikZ · · Score: 1

      Did you send the programmer a note?

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    3. Re:Not really sure this is that big of a problem by Brandybuck · · Score: 1

      FreeBSD puts all third party applications under /usr/local or /usr/X11R6. Most Unix and Unix like systems do this. Only Linux seems to be the exception. It's almost like they never heard of /usr/local.

      --
      Don't blame me, I didn't vote for either of them!
    4. Re:Not really sure this is that big of a problem by Alrescha · · Score: 1

      "Did you send the programmer a note?"

      Yes. The reply was that he didn't want to cause confusion so he installed it in the same place it got installed in Linux.

      A.
      (mumbling something about two wrongs...)

      --
      ...bringing you cynical quips since 1998
  18. One idea, no really by mugnyte · · Score: 1, Interesting

    Config files aren't going to be forward compat, so place their contents into an XML file. But also place enough documentation in the XML file that each admin can grow a small hand-editable help file right with it, geared towards the audience they admin with. DON'T keep all these xml's in the etc file, but in another directory.

    "xtransetc" build a navigatiable page set from the files, allow you to hop around quickly and remotely.
    "genetc" fills the dir from the xml files, as you've tweaked it (with comments, don't/dos)
    "readetc" fills the xml file "meat" from the etc directory itself, thus it's two-way.

    This first step re-bottles the data in a more extensible format. Next up, you keep portions of the "meat" in the user's specific folders. Then, genetc collects and collates these separate portions into a single etc folder, overwriting with the xml base. this runs at full logon. next, during this process, check user's groups to ensure they have overwriting permissions for each config payload.

    New configuration files can be absorbed blindly, just leaving many of the metadata tags empty. a list of "feed" dirs is kept in the xml store, as well as the "discovered_in_dir" tag in the xml file.

    Dependencies can be built through metainfo tags as well, but also holding very specific information, like dates, checksums, or package/file authentication. In addition, a "cross-compatability" section can list several safe substitutes for given dependencies.

    the full thesaurus of dependency identifiers (since multiple names may point to the same program) has be to the cross-distro key. this shouldn't be hard, just a web site one distro starts and as others creep up, are posted.

    in this way, you can gen a full web version of all distro/packages/apps/config files into a single tree, with dependencies and synonymous identifiers. also, versions will add "depth" dimension to the tree to see where branches formed and detached (if ever).

    um, yeah. i'll get right on that.

  19. A really bad idea by toddbu · · Score: 1
    I know that some people love the idea of having a registry, but I personally think that it's a really bad idea. I've had plenty of experience with the Windows registry and I really hate it. What could be easier when configuring a machine than to copy a file from one place to another or just echo something into a config file? Yeah, regedit has some tools for loading .reg files into the registry, but why bother? And do you really think that the Windows registry is anything less of a mess than /etc? There's lots of undocumented crap in a Windows registry.

    Supposedly registries are supposed to make administration easier, but in my experience they do exactly the opposite. Think about how many times you see instructions on Windows that say "before you make any changes, back up the registry". Having a registry makes sense when all your data all looks the same, but this isn't the case for config data. Every config file is different for a reason.

    Of the many reasons that I switched from Windows to Linux, the ease of configuration was high on the list. I love RPMs because the config data just falls right into place without me having to touch anything or worry about messing up some other program's config data. Adding another layer to config data that doesn't add any value would just screw things up. I'd go so far as to argue that Windows would be a lot easier to deal with if they brought back .ini files.

    --
    If you don't want crime to pay, let the government run it.
    1. Re:A really bad idea by NullProg · · Score: 1

      You forgot the most important flaw with the registry. Single point of failure.

      I've seen more than a few computers where a bad block on the hard drive mapped back to the registry. At that point you have to reinstall windows and all your programs. It would be much easier to reinstall windows with your old programs/icons/preferences in place if each program kept thier settings in an Ini.

      Linux makes this easy. Tar $home, install new distribution. Add user, extract home.tgz. All icons, preferences etc. restored.

      Enjoy,

      --
      It's just the normal noises in here.
    2. Re:A really bad idea by Drantin · · Score: 1

      How about a defined directory structure within /etc with a simplified version of the registry for layout? You could still hand-modify the config files and copy them to another computer, or just backup particular configs with a simple cp the same as now...

      --
      Actio personalis moritur cum persona. (Dead men don't sue)
    3. Re:A really bad idea by damiam · · Score: 1
      I know that some people love the idea of having a registry, but I personally think that it's a really bad idea. I've had plenty of experience with the Windows registry and I really hate it.

      A registry != the Windows registry. None of the standard Windows registry complaints apply to GConf, for example (not that it doesn't have faults of its own). If you want to argue against the general concept of registries, anecdotes about bad experiences with the Windows registry aren't relevant.

      --
      It's hard to be religious when certain people are never incinerated by bolts of lightning.
    4. Re:A really bad idea by toddbu · · Score: 1
      Why don't Windows registry complaints apply to GConf? If I'm using the registry "properly" then I should never access it outside of APIs and tools that are provided for management of the registry. The fact that GConf stores data in individual files that can be accessed from the filesystem is irrelevant. Either you chose to use the registry or you don't.

      The main point of my first post is that centralizing all your config data into one tool doesn't add any value. Certainly centralizing it into one place makes backing stuff up easier, but you don't need a registry for that.

      --
      If you don't want crime to pay, let the government run it.
    5. Re:A really bad idea by damiam · · Score: 1
      Why don't Windows registry complaints apply to GConf?

      It's not binary (so not easily corrupted) and it's pretty much fully documented.

      The main point of my first post is that centralizing all your config data into one tool doesn't add any value.

      Centralizing config data does add value. It saves developers from having to write a seperate, potentially buggy, config parser for every project, it allows administrators to easily manage system defaults and control what settings users are able to change, and it enables cool tricks like GNOME's instant-apply. Plus, gconf-editor is less intimidating to novice users than editing ~/.app/config, and more convenient for power users (IMHO).

      --
      It's hard to be religious when certain people are never incinerated by bolts of lightning.
    6. Re:A really bad idea by toddbu · · Score: 1
      My mom isn't going to use gconf-editor. Nor is she going to use anything else. The end user could really care less how config data is stored, with the exception of wanting it backed up and easily restorable in the event of the failure. I don't get how a registry helps that. I can use tar to restore /etc as fast as any tool that you have can load the registry.

      You didn't answer my comment about how one should use the registry. The problem isn't binary/non-binary, it's "am I going to use the registry or not". Using a registry for the sole reason of being able to easily parse data is not sufficient to make me want to switch. In addition, your implication that we bypass the registry in certain circumstances is very problematic. If I write data directly to files in the registry and then someone decides to change the way that the registry works then I've just introduced a new problem which my sysadmin isn't going to be very happy about. Of course you could always make the registry backward compatible on the storage side, but this seems like a waste of dev and test resources and leads to code bloat and performance loss.

      For what it's worth, most admins would rather I write a sed script to update my .conf file than hand them a convoluted list of things that need to be updated in the registry. Across a large server farm, it's virtually impossible to make changes by hand across hundreds or thousands of servers.

      Does anyone else have a problem that it's Friday night and we're arguing about the merits of registries? :-)

      --
      If you don't want crime to pay, let the government run it.
    7. Re:A really bad idea by damiam · · Score: 1
      The end user could really care less how config data is stored, with the exception of wanting it backed up and easily restorable in the event of the failure. I don't get how a registry helps that. I can use tar to restore /etc as fast as any tool that you have can load the registry.

      A registry is not any easier or harder to backup and restore than /etc, so I don't think it's really an issue.

      You didn't answer my comment about how one should use the registry. The problem isn't binary/non-binary, it's "am I going to use the registry or not". Using a registry for the sole reason of being able to easily parse data is not sufficient to make me want to switch. In addition, your implication that we bypass the registry in certain circumstances is very problematic.

      I don't know where you got that, but I didn't mean to imply that. Assumming we're talking specifically about GConf, you should only access it through the APIs and gconf-editor/gconftool (which use the APIs). The fact that GConf uses XML is important not because the people should be editing its files by hand, but because it allows for simple recovery if something goes wrong.

      As for changes across server farms, GConf specifically isn't designed for server apps (AFAIK; I'm not a gconf expert), but there's no reason it couldn't be adapted (or another system devised) to automatically handle propagation of settings across a large network.

      --
      It's hard to be religious when certain people are never incinerated by bolts of lightning.
    8. Re:A really bad idea by toddbu · · Score: 1
      The fact that GConf uses XML is important not because the people should be editing its files by hand, but because it allows for simple recovery if something goes wrong.

      Really? You just said that I should *never* be accessing the registry by any means other than the APIs or tools that the registry provides. So what does XML have to do with anything? Isn't the storage internal to the registry?

      --
      If you don't want crime to pay, let the government run it.
    9. Re:A really bad idea by damiam · · Score: 1

      Don't be pedantic. Under normal circumstances, you only should access GConf through the APIs. If something goes wrong (which is no more or less likely with gconf than with a standard config-file system), then obviously you'll want to access the files by hand. Your complaint about "If I write data directly to files in the registry and then someone decides to change the way that the registry works..." is only valid if you're thinking about a program that makes a habit of writing to gconf files directly. The version of gconf on your machine is not going to magically switch storage formats while you're editing its files.

      --
      It's hard to be religious when certain people are never incinerated by bolts of lightning.
    10. Re:A really bad idea by toddbu · · Score: 1
      I'm not being pedantic. As the "plantiff" in this case, you have the burden of proof that registries are better than storing files in /etc. So far your arguments have been:
      1. Registries provide tools for parsing values from files
      2. Registries provide centralized storage of data
      3. Registries are easier to manage
      4. That the Windows registry is sufficiently different from other registries to make any comparison invalid
      I've already conceeded point #1 to you. I think we came to the agreement that point #2 isn't really unique to registries and therefore doesn't apply. The reason that I'm pressing on point #3 is that if you want me to take on a new tool then it had better solve the problem, if one exists. You haven't shown that there's a problem to begin with, or that cramming all config data into a registry fixes the "mess" of varying key structures within a node. In order for the registry to be stable and reliable for *every* application on your machine, I have to assume that I should never touch the internal data structures, which means that the Windows registry (#4) really isn't any different than any other registry on the planet.

      If we agree on #1, why not just write the equivalent of GetPrivateProfileString() and be done with it? It seems like a much more balanced solution.

      --
      If you don't want crime to pay, let the government run it.
    11. Re:A really bad idea by Anonymous Coward · · Score: 0

      Why don't Windows registry complaints apply to GConf?

      Well...look at the complaints about the Windows registry:

      - It's a single binary file (GConf is stored in text files, and they can be edited by hand)

      - It stores hardware- and app-level configuration together (GConf is app configuration only, so you can't possibly make your machine unbootable no matter how bad you screw up GConf)

      - The keys are undocumented (GConf has both short and long descriptions stored with each key)

      Basically the only thing GConf and the Windows registry have in common is that they're both hierarchical configuration storage. But virtually any configuration storage mechanism is hierarchical (even your filesystem).

      I place the challenge back on you: why should any complaints about the Windows registry apply to GConf?

  20. /etc is not a mess in... by Anonymous Coward · · Score: 0

    OpenBSD.

  21. Switch OS's by raider_red · · Score: 1

    Buy a Mac, then you won't have to worry about what's in /etc. It'll still be there, but you won't have to look at it.

    --
    It's good to use your head, but not as a battering ram.
    1. Re:Switch OS's by walt-sjc · · Score: 1

      Um, even on a mac you have to hand edit if you want to do something that the GUI doesn't handle - this happens ALL THE TIME.

    2. Re:Switch OS's by merdark · · Score: 1

      Um. I have a mac, and this hasn't yet happened once. What on earth are you doing having to modify etc by hand ALL THE TIME??

    3. Re:Switch OS's by Anonymous Coward · · Score: 0

      Any sort of server configuration, at least on the desktop product.

      My Mac Zealot buddy switched to Windows/IIS for home webserving because he was scared of the apache config file and wanted a GUI. Oh, how the tables have turned.

    4. Re:Switch OS's by Anonymous Coward · · Score: 0

      Then the dumbass should have gotten the OS X Server version, instead of the consumer version.

    5. Re:Switch OS's by walt-sjc · · Score: 1

      Administering a headless XServe for example. Most of the "server level" apps need hand tuning / config. Apache, Bind, the firewall, LDAP, Postfix, Samba, NFS... Need I go on?

      I must say, Apache needs the most hand-config of any app on the system. The gui totally blows.

  22. The good, the bad, and the ugly by gseidman · · Score: 3, Interesting

    What's the real problem with /etc anyway? If you said "all the different and wacky file formats" then you're missing the forest for the trees. Those different file formats exist because it is appropriate to have a file format that suits the purpose of the application. /etc/password and /etc/group are designed for exactly the purpose for which they are used, for example. It doesn't make much sense for apache to have a file format similar to, say, exim; they are applications with entirely different purposes.

    The real problem is that the user doesn't automatically know how to correlate a process, configuration file, startup script, etc., and it affects more than just /etc. Suppose I am administering a Debian machine with CUPS, since I happen to have one handy. Something is wrong with printing. I have to somehow know all of the following:

    1) Printing services are managed by CUPS.
    2) To start and stop printing services, I need to run /etc/init.d/cupsys
    3) If that doesn't work properly, the process to kill is named cupsd.
    4) The config file for specific printers for CUPS is /etc/cups/printers.conf
    5) The config file for the cups service as a whole is /etc/cups/cupsd.conf
    6) To manage most things about CUPS (though not browsing and sharing), I don't really want to touch the files in /etc/cups but, rather, connect to http://localhost:631/ with a web browser.

    Just for kicks, let's consider the same situation under MacOS X (10.3):

    1) I can control pretty much everything about printing services (including browsing and sharing) from the Print & Fax section of the System Preferences
    2) If I really need to mess with the config files, they are in /etc/cups, but I never do.
    3) If I really need to manually start and stop printing services I use /System/Library/StartupItems/PrintingServices/Prin tingServices, but I never do.
    4) If I really need to use the web interface to CUPS, it is still at http://localhost:631/

    The really important thing here is that on a Mac, I don't even need to know that printing is handled by CUPS. The down side is that on any *nix, unlike Windows, I don't have a way of seeing all the services my machine is providing (to itself or the net). Of course, under Windows it's pretty hard to tell what a service is really for, or how to configure it. When you get right down to it, each system has some good ideas, but none of them have it right.

    I want a system where I can get a list of running services (not just all processes), the ports on which they are listening (I don't care if they are TCP, UDP, Unix domain, whatever passes for IPC on Windows, or even Mach ports), and be able to trivially turn a service on, or off, or configure it with a simple commandline or a click of the mouse.

    Give me the Windows services manager (with a console equivalent) with the ability to see through what interfaces (e.g. ports) that service is provided, the ability to configure when and how it is started (e.g. at which runlevel), the ability to configure it directly from there (e.g. bring up a custom configurator, a web browser with the appropriate URL, or a text editor on the right files with a double-click in the list). I don't care where the configuration is on disk (though this better integrate well with backup software), nor how it's stored (though there had better be a human-readable text format that can be exported and imported, if necessary).

    Furthermore, there should be a separation of default configuration of user applications and configuration of services. Why does /etc/profile belong in the same place as /etc/inetd.conf? That gets back to the central question, of course, and I think the answer there is that each package should be responsible for managing its own (default and user) configuration and, similarly

    1. Re:The good, the bad, and the ugly by Short+Circuit · · Score: 1

      Try "nmap localhost" .. nmap package required, of course.

      That'll show you the IP-based services on your system, be they standalone daemons or run through inetd.

      You'll also need the command that lists services provided by the RPC port. But I forget what it is...

    2. Re:The good, the bad, and the ugly by NullProg · · Score: 1


      I want a system where I can get a list of running services (not just all processes), the ports on which they are listening (I don't care if they are TCP, UDP, Unix domain, whatever passes for IPC on Windows, or even Mach ports), and be able to trivially turn a service on, or off, or configure it with a simple commandline or a click of the mouse.


      SuSE Yast does all this.

      Give me the Windows services manager (with a console equivalent) with the ability to see through what interfaces (e.g. ports) that service is provided, the ability to configure when and how it is started (e.g. at which runlevel), the ability to configure it directly from there (e.g. bring up a custom configurator, a web browser with the appropriate URL, or a text editor on the right files with a double-click in the list). I don't care where the configuration is on disk (though this better integrate well with backup software), nor how it's stored (though there had better be a human-readable text format that can be exported and imported, if necessary).

      Again, SuSE Yast does all this. It appears you have a distribution specific issue.

      Enjoy,

      --
      It's just the normal noises in here.
    3. Re:The good, the bad, and the ugly by Anonymous Coward · · Score: 1, Insightful

      Those different file formats exist because it is appropriate to have a file format that suits the purpose of the application. /etc/password and /etc/group are designed for exactly the purpose for which they are used, for example. It doesn't make much sense for apache to have a file format similar to, say, exim; they are applications with entirely different purposes.

      You have conflated "syntax" and "data model" into "file format". It doesn't make sense for apache to have a file format similar to exim because their data models are different. But that doesn't mean that they shouldn't share the same syntax.

      You might as well say that there's no reason for Slashdot and Google to have the same syntax (HTML) because they serve completely different purposes. You are looking at the problem at the wrong level.

    4. Re:The good, the bad, and the ugly by GigsVT · · Score: 2, Informative

      I want a system where I can get a list of running services (not just all processes), the ports on which they are listening (I don't care if they are TCP, UDP, Unix domain, whatever passes for IPC on Windows, or even Mach ports), and be able to trivially turn a service on, or off, or configure it with a simple commandline or a click of the mouse.

      Are you aware of netstat -anp as root?

      chkconfig fulfills a lot of your later wants too.

      I'm happy using those tools, if you want to write a front end UI, feel free! It wouldn't be hard, mostly just external calls to those commands.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    5. Re:The good, the bad, and the ugly by gseidman · · Score: 2, Insightful
      Those different file formats exist because it is appropriate to have a file format that suits the purpose of the application. /etc/password and /etc/group are designed for exactly the purpose for which they are used, for example. It doesn't make much sense for apache to have a file format similar to, say, exim; they are applications with entirely different purposes.

      You have conflated "syntax" and "data model" into "file format". It doesn't make sense for apache to have a file format similar to exim because their data models are different. But that doesn't mean that they shouldn't share the same syntax.

      You might as well say that there's no reason for Slashdot and Google to have the same syntax (HTML) because they serve completely different purposes. You are looking at the problem at the wrong level.

      It isn't quite that simple, though you raise a good point. While it would be possible to represent all of the same information in XML, for example, that is represented in /etc/password, the exim config, and the apache config, it doesn't make sense to do so. While it might even make sense to take the larger and more complicated configs and unify their syntax, it is highly desirable to be able to use standard unix tools such as grep and cut to be able to get information from /etc/password and the like.

      P.S. If I were a moderator, I'd mod the parent anonymous post up.

    6. Re:The good, the bad, and the ugly by gseidman · · Score: 1

      [SuSE Yast]

      Nice! I will look into it. Of course, I still want all the other good things that Debian has and SuSE does not, but I might simply fork Yast (it's GPL'd nowadays, isn't it) to make it just a service management tool for Debian.

    7. Re:The good, the bad, and the ugly by NullProg · · Score: 1

      After your base install, look at synaptic. It provides what your missing with the base SuSE install. It's apt-get for SuSE.

      Enjoy,

      --
      It's just the normal noises in here.
    8. Re:The good, the bad, and the ugly by gseidman · · Score: 1

      The main thing that's missing with a SuSE install as compared to a Debian install is more than just apt. It's much more a matter of the strict adherence to Debian packaging policy and the hundreds and hundreds of Debian developers who do. There is a tremendous amount of software in the Debian repository, and I can install any of it with near 100% confidence that it will not make unexpected problems for other parts of my system. It isn't something that can be handled by a piece of software, it's a human management issue.

  23. Re:but i thought by Anonymous Coward · · Score: 0

    ... and if this was a windows bashing story and you said "windows was flawless... *runs*...", it would be +1 funny

  24. great post! by XTbushwakko · · Score: 0

    I've been thinking about this too, and actually the windows registry has the right idea. there you don't have to parse and merge a file to add an option, you just make a new key and such. the comments could be added as a note to each key or something. great initiative.

    1. Re:great post! by XTbushwakko · · Score: 0

      ok to, clarify this, what would be better would have all the files in etc, but perhaps better structured, BUT all the files should be in xml or some easy parsable format. The best thing with the windows registry is that you add and change keys dynamically, and if there is an update jsut add a new key. don't diff the file. If people remove / change comments and/or order of the vars in config files, the diffs are in trouble. Also a file with xml could have the "comments" added as data. So when you parse they file and edit it in an editor it would be viewed as a tooltip or something.

  25. Turn it into AIX? by mnmn · · Score: 1

    The /etc can be replaced with smitty. Heck the config files themselves can be databasen, or in a database, or (gasp!) registry.

    All that is the windowsizeation of unix. The whole mess of /etc comes from the unparalleled freedom developers enjoy on unix in the first place, no placing intricate structures in some central registry.

    The real mess is the difference between /etc, /etc/app.conf/, /usr/local/etc, /opt/etc, /var/etc, ~/.app/etc.... etc etc

    Proper hier structures dictate that apps installed as a part of the OS should go into /etc, others should head into /usr/local/etc. End of story. The problem comes when people compile their own apps, and either do not do ./configure --prefix=/usr/local, or the app doesnt allow it. Another issue is multiple installations of an app...

    All that can be solved by making sure all apps when compiled can accept --prefix, and when in packaged form, can be installed in a different folder root, like /usr/apps/app1/etc.

    And to start solving such issues, we should begin by whipping apps like qmail, which go to lengths not to get installed in the proper directories.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    1. Re:Turn it into AIX? by Anonymous Coward · · Score: 0

      whipping apps like qmail, which go to lengths not to get installed in the proper directories.

      No way, qmail is a good example of how to do things better. Ultra simple config that can be automated and understood. Don't like /var/qmail/control? Just make a link to /etc/qmail-control. It's not like you have to do much to qmail once you install it. I have a server with qmail that is approaching 365 day uptime, and I haven't logged in about that long.

      I wish more software was like qmail, not less.

    2. Re:Turn it into AIX? by mnmn · · Score: 1

      Dont get me wrong, I prefer qmail over sendmail and postfix, been using it for virtualhosts and whatnot, and has impressed me with the efficiency.

      But I was referring to the directory placement. Say qmail decides to go into /var. Say bind decides to head for /dev. and X gets installed possibly in /usr/local/tmp, while apache uses /opt/httpd or something. How do you take account of installed software, package managers? How do you assign partitions to various parts of the progs? Can you replace the /etc of one machine with another's, remove all log files in /var and it turns into the other machine?

      --
      "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    3. Re:Turn it into AIX? by Anonymous Coward · · Score: 0

      The whole mess of /etc comes from the unparalleled freedom developers enjoy on unix in the first place, no placing intricate structures in some central registry.

      Excellent use of spin.

      I would have done it the opposite way:

      "The whole mess of /etc forces each developer to reimplement the wheel with new intricate code, instead of being able to simply dump the relevant into a central registry."

      But hey, this is slashdot -- it doesn't matter which way you spin it, as long as it's got spin!

  26. What's the big deal? by Stevyn · · Score: 1

    On a gentoo system, after you update a package with an /etc/* file, it tells you that you have to update the file. Then you run "etc-update". I usually play the game this way. If I've ever edited the file, I'll take a look at it to see if it's going to bork my system. If it's not a file I've ever touched, I'll assume that the changes are fine and I replace the file...

    oh wait...that only works if the user knows what's going on with the system...I'd hate to be an administrator in charge of many computers after an update!

    1. Re:What's the big deal? by Anonymous Coward · · Score: 0

      Unfortunately I have no linux experience and dove into Gentoo to check out this Linux stuff. After I finally had everything set up I did an update. I saw that update config message and tried etc-update. I had no idea what was going on and of course I ended up screwing up all my config files. I started everything over again and went through more carefully the next time. Sure I learned a lot, but man that sucked... Something should be done so new users like me aren't so intimidated the first time around.

    2. Re:What's the big deal? by Stevyn · · Score: 1

      I did the same thing. And I broke the computer. However, I did this on a test computer so it didn't matter. You should always try new stuff in an environment where breaking things doesn't matter. After I felt comfortable with gentoo, I put it on my laptop which is my main computer. I've been happy ever since.

  27. as usual, complexity is the problem by Anonymous Coward · · Score: 4, Insightful

    * Using XML is ABSOLUTELY NOT a solution. It is a problem. You can't assume XML-based tools available everywhere. I'm not going to link a 2MB XML library into my 1KB daemon. If you tell me I have to, I will put my config someplace else. I'm not going to put a 2MB XML library on my 8MB flash card. XML makes absolutely no sense for a mission-critical config.

    * The config files are way too complex NOW, even without XML. Everybody invents pointless file formats. For instance if you need a flag for a program, just use the abscence or presence of a file in a directory in the filesystem! Don't create a format, write a parser, deal with error checking, etc, etc, just to set a damn flag. Another advantage to using the filesystem as a database (or "registry" if you prefer) is that it becomes super-easy to automate. Automation, simplicity, and guaranteed correctness are GOOD things.

    Something to think about: your filesystem is a key/value database, for example "/etc/hostname" is a key, and the contents of that file is the value. There, you don't have to write a parser or a new config file format. Use what's already there.

    I remember when Red Hat and other distros started setting up Apache (and other programs) so that they read extra config files out of a directory, instead of trying to automate in-place edits using sed or something. Suddenly everything got 10x easier. Need to install a new config? Just link or copy to the directory.

    Taking this to the logical conclusion, you have DJB's software (qmail, djb-dns, etc). Ultra-minimal config using only environment variables or a few line-oriented files. Very flexible, easy to automate, updates can be atomic, merges/updates can done with ssh/rsync, and so forth. Configs can be placed anywhere you want, not just in a special spot in /etc.

    Gentoo is on the right track in this department. They use filesystem-based configs for some things (for instance the bash-completion package can be configured by linking things into a directory).

    * If you absolutely need a complex config, use a shell script that sets environment variables. Many distros (BSD, gentoo again) also use configs that are shell scripts. I.e. the config is just a script that sets some variables. If you want, you can add some code in the script to do calculations or have other logic. This is very nice and flexible. And you don't have to write a new parser, you can assume /bin/sh and basic Unix tools are present.

    * Merging updates: this is impossible to automate. This is the same problem as branching/merging in a version control system. The best thing we can do is 1) KEEP THE CONFIGS SIMPLE as mentioned above 2) use version control to track changes and assist with the merge and 3) again, keep it simple! (Imagine what a nightmare XML would be for merging, by the way). You as an admin should know how to merge the configs, and the machine should make it as simple as possible.

    Again Gentoo is on the right track here too. It makes it easy for you to diff/merge your new configs, and can even keep old revisions in version control with RCS.

    * The name of the directory (/etc) is bad, it should be /config or something, but we're kinda stuck with it I think.

    So in conclusion, /etc is not broken, it's not a problem, there's nothing to "solve". Just focus on simplicity. If your ego wants you to invent yet another config file format, DON'T. If your software has a bunch of useless config settings, trim them down, use command-line flags, do something, don't just pile them into a config file. Make your software work in some capacity WITHOUT a config. Look at DJB's software for ideas on how to keep your config simple and powerful. Use the power of pipes, shell scripts, line-oriented text files, and so forth. THINK about the busy admin who has to deal with your crap.

    And please, no XML!

    1. Re:as usual, complexity is the problem by merdark · · Score: 1

      Here is something else to think about. Each small file, even if it contains no data, takes up a standard chunk of disk space.

      Filesystems are designed to store things on disk, they are not meant to efficiently store and retrieve (key, value) pairs. That is what a database is for. Databases also have to deal with disk storage, and they do that through the filesystem in an intelligent way. However, their functionality is WAY more complicated than simply makinga file for each key/value pair.

      Finally, as a busy admin that has to deal with crap, I find the current system severely lacking. Especially upgrading, and yes I've seen the gentoo way, and no it's no better than other ways. Debain and FreeBSD both have very similar solutions. /etc is mess. There is no reason why I should have to learn 100 different acronoms and file formats to administer a system. Upgrading should deal with configuration files in an intelligent way, otherwise known as configuration migration.

      Besides, the fact that you use gentoo should exempt you from this discussion. Compiling your whole operating system and every update is a ludacris idea. No wonder you like the current messy system.

    2. Re:as usual, complexity is the problem by Reality_X · · Score: 1

      Well written and argued.

      But how would you design Apache's config format to be simple and still retain the same amount of flexibility?

    3. Re:as usual, complexity is the problem by Anonymous Coward · · Score: 0

      Admins look at things from an Admin point of view, so obviously when you want to apply an update to many machines you do not want to wait around for it to compile.

      A User on the other hand who wants to get the most out of their workstation/laptop apprieciates the Gentoo way. Updates are no-brainers and I can configure the package with whatever compile options I want.

    4. Re:as usual, complexity is the problem by Anonymous Coward · · Score: 0

      Each small file, even if it contains no data, takes up a standard chunk of disk space.

      This is not an issue at all.

      Filesystems are designed to store things on disk, they are not meant to efficiently store and retrieve (key, value) pairs.

      That's pretty funny. How do you think it finds files then?

      That is what a database is for.

      The filesystem *is* a database. A more general database gives you *data integrity*, which would be impossible to specify for config files anyway.

      Databases also have to deal with disk storage, and they do that through the filesystem in an intelligent way.

      Uhm, right, that's why you don't need an extra layer above the filesystem when you have less than, say, 10,000 items to store under each subkey. Do you store a site's web pages in a database for instance?

      There is no reason why I should have to learn 100 different acronoms and file formats to administer a system.

      I try not to have 100 different critical packages installed. Maybe your site needs an extra admin?

      Upgrading should deal with configuration files in an intelligent way, otherwise known as configuration migration.

      Describe this "intelligent way", and how is it *fundamentally* different than regular version control? Why would something other than flat line-oriented files make it *easier* to implement?

      Compiling your whole operating system and every update is a ludacris idea.

      I'm not much of a Ludacris fan, I must admit.

    5. Re:as usual, complexity is the problem by HyperChicken · · Score: 1

      Apache's config is hierarchical. It's a natural for a filesystem-based configuration.

      --
      Free of Flash! Free of Flash!
    6. Re:as usual, complexity is the problem by kwerle · · Score: 1

      * ... You can't assume XML-based tools available everywhere.

      Name a platform that doens't have 'em, and I'll name one that I don't care about.

      I'm not going to link a 2MB XML library into my 1KB daemon. If you tell me I have to, I will put my config someplace else.

      It's a shared library. It's in memory already. May as well use it.

      I'm not going to put a 2MB XML library on my 8MB flash card. XML makes absolutely no sense for a mission-critical config.

      I just don't understand those statements.

      * The config files are way too complex NOW, even without XML. Everybody invents pointless file formats... Automation, simplicity, and guaranteed correctness are GOOD things.

      Pretty easy to argue that XML would simplify things in terms of having only one file format. As for "correctness" - yeah, XML validation would save a lot of headaches.

      * If you absolutely need a complex config, use a shell script that sets environment variables. Many distros (BSD, gentoo again) also use configs that are shell scripts. I.e. the config is just a script that sets some variables. If you want, you can add some code in the script to do calculations or have other logic. This is very nice and flexible. And you don't have to write a new parser, you can assume /bin/sh and basic Unix tools are present.

      Yeah, evaluating variables in shell scripts never introduced security problems, parsing errors, etc. and "you can assume /bin/sh ... are present" conflicts pretty strongly with "you can't assume XML tools are present" - since XML tools are more ubiquitous than /bin/sh.

      * Merging updates: ...(Imagine what a nightmare XML would be for merging, by the way). You as an admin should know how to merge the configs, and the machine should make it as simple as possible.

      I'm having a hard time trying to imagine merging XML being any harder than any other format. ...And please, no XML!

      I wonder what XML ever did to you...

    7. Re:as usual, complexity is the problem by merdark · · Score: 1

      Each small file, even if it contains no data, takes up a standard chunk of disk space.

      This is not an issue at all.


      This statement shows your extreme lack of knowledge in this area. Explaining disk blocks and how the file system reads and writes would be a waste of time.

      Filesystems are designed to store things on disk, they are not meant to efficiently store and retrieve (key, value) pairs.

      That's pretty funny. How do you think it finds files then?


      It find files in a way that is based on the structure of disks. As a small example, when you read from a disk, it always reads a given chunk of data, regardless of the fact that you only need a small portion of that chunk. The layout of data on the disk has huge performance implications. Filesystems only take into account locality of data for files, not collections of files.

      Uhm, right, that's why you don't need an extra layer above the filesystem when you have less than, say, 10,000 items to store under each subkey. Do you store a site's web pages in a database for instance?

      Subkey? So tell me, where does a subkey come in, in a system that stores things by key/value pairs? 10,000 items under a key? Wait, what happened to the key/value pair idea? Oh, that's right, that would be terribly inefficient because of the whole data locality issue, hence needing to store many items in a single file (key). Maybe you should get your thoughts straight.

      And websites store wepages in memory cache if they are accessed a lot. This is because disk access is slow, and the website knows more about what needs to be in memory cache than the filesystem.

      There is no reason why I should have to learn 100 different acronoms and file formats to administer a system.

      I try not to have 100 different critical packages installed. Maybe your site needs an extra admin?


      Clearly the idea of exaggeration is beyond you. Let's see, on a linux system you can have PAM, CUPS, various files for host name, networking, name resolution, firewall, routing, account defaults, processes accounting, log rotating, job scheduling, maybe dhcp, samba, nfs, a web server, a database, configuration files for various apache modules (php,webdav,database plugins), maybe you have kerberos, maybe you have an LDAP server, perhaps you have security software such as tripwire... SMTP server, perhaps a pop server, an imap server, and there multiple software solutions for many of these components, all with different confiuration files.

      Highering more admins to make up for a defiecient system is not a good solution.

      pgrading should deal with configuration files in an intelligent way, otherwise known as configuration migration.

      Describe this "intelligent way", and how is it *fundamentally* different than regular version control? Why would something other than flat line-oriented files make it *easier* to implement?


      Very simple. Minor revisions should not change configuration formats. For major revisions, the software developers know what has changed in the configuration and should be able to migrate old settings so that they work in the new software. If there are new features, this should pointed out upon migration so that the admin knows exactly what needs to be looked at. Also, once a set of changes are made, they should be able to be supplied to the upgrade program so that you can upgrade a set of machines in a completely automated fasion.

      And wait? You use cvs to manage your /etc data? But I thought that /etc was just fine the way it was and that there was no *problem*? Using cvs in this fashion is an attempt to fix some deficiencies in the /etc system. There are also more complicated packages to do this which have extra features specific to configuration managment.

    8. Re:as usual, complexity is the problem by shannara256 · · Score: 1
      If you absolutely need a complex config, use a shell script that sets environment variables. ... I.e. the config is just a script that sets some variables. If you want, you can add some code in the script to do calculations or have other logic. ... you can assume /bin/sh and basic Unix tools are present.

      It is my understanding that environment variables can be bad for security reasons. A privileged or semi-privileged (set UID) program being called by an unprivileged user can't trust the user to configure some parts of it. The solution is to have a configuration file that the user can't touch, and perhaps not even see, but which the program can read and maybe write.

    9. Re:as usual, complexity is the problem by Anonymous Coward · · Score: 0

      There is no reason why I should have to learn 100 different acronoms and file formats to administer a system.

      Instead, there should be a list of all the things you are supposed to do with your computer, and little checkboxes to turn them on and off. Right?

      Do you, by any chance, take the time to learn what each of those 100 apps does before enabling or configuring it? If not, why should you expect the file formats to be all the same, when they are not the same applications? Most configuration files are almost exactly the same, a list of name=value pairs. What they mean is in the man page or other documentation. Too bad that you have to actually look at the docs instead of clicking little radio buttons and check boxes to do the preselected things the designers thought you might want to do.

    10. Re:as usual, complexity is the problem by merdark · · Score: 1

      Really? It's too bad that there are NOT man page for all those files. It's too bad that the configuration files are NOT all name-value pairs. It's too bad that often one application has multiple config files associated with it.

      And if they are really all the same, then you could upgrade a program without worrying about the config files changing. Too bad that's not the case.

  28. Linux turns newbies into programmers by Ridgelift · · Score: 2, Interesting

    I didn't even think of /etc as a problem to be solved. Tools like grep, find, vi, and others are all there to rip through text file configurations.

    Maybe a naming standard would be more appropriate. A solution like Windows Registry would give me nightmares. Have you ever dealt with a corrupt registry on a system?

    I say keep /etc the way it is. It might be a mess, but the alternatives are worse.

    1. Re:Linux turns newbies into programmers by shaitand · · Score: 1

      How about simple standards for the format and placement of files in /etc. That way we get the best of both worlds.

  29. Rox, anyone? by Anonymous Coward · · Score: 0

    Why not switch to using Application Directories? Simple, self-contained, and easy to manage.

  30. /etc is a mess? by ConceptJunkie · · Score: 1, Insightful

    There's something that's much better. It's called "\Documents and Settings".

    Very organized, consistent, and above all easy to understand.

    --
    You are in a maze of twisty little passages, all alike.
    1. Re:/etc is a mess? by nxtw · · Score: 1

      It's called "\Documents and Settings". Documents and Settings is the Windows equivalent to /home. \Documents and Settings\All Users provides global start menu, desktop and favorite entries, while Default User does the job of skel. The user's own registry is stored in their home directory as NTUSER.DAT. Inside each user's home directory are some expected folders - Start Menu, My Documents, Favorites, Desktop, Cookies, Application Data (where most application data hides), Local Settings, etc.

    2. Re:/etc is a mess? by ConceptJunkie · · Score: 1

      Yeah, I know. I was trying to point out that no matter how bad the Linux configuration and standard directory organization is it couldn't be worse than Windows. "Documents and Settings" is a confusing mess and the registry is a nightmare for those who haven't spent hours digging through it.

      Maybe /etc would be better if it was called "/My etc".

      It was a Microsoft bash, I was hoping for some cheap karma.

      --
      You are in a maze of twisty little passages, all alike.
    3. Re:/etc is a mess? by nxtw · · Score: 1

      How is Documents and Settings a confusing mess? It's fairly straightforward. Each user has his/her own directory, Default User is right there (opposed to a skel directory placed in a completely different location), and All Users provides data for all users. It's sorted, which is better than having all your dotfiles and documents in one home directory.

    4. Re:/etc is a mess? by ConceptJunkie · · Score: 1

      Why are half the folders hidden? What's the point of storing (for instance) the Thunderbird or Outlook Express mail store in a hidden location?

      This is supposed to be something that the average user can understand so he can back up his e-mail?

      If MS were capable of making Windows so you could decouple the concepts of data and the files they are in, it would be OK. But doing anything but the most trivial of functions under Windows requires understanding files and where they are located. Of course, at the same time, file extensions are turned off by default meaning the poor novice is stuff looking at often meaningless icons to try to figure out what the file is.

      MS's tools are always well-designed, but only for a ridiculously narrow domain of problems (Visual Studio is a fair exception, but not the libraries). Once you do anything out of the ordinary, you're totally in the woods, and as someone who's been playing in the DOS and Windows world for almost 25 years, I regularly do the unexpected because it doesn't occur to me that it is. I remember the days when you had to rewrite every installation batch file and INI file before the apps would even work (remember when everyone assumed the harddrive was C: or dumped all their files in the \Windows directory?) Should I mention the hours and hours of pain I suffered because some marketing moron thought "Program Files" was a great name for a directory in Windows 95 when most programs couldn't handle spaces? Should I point out that you need registry hacks just to keep that stupid MS Messenger from running?

      Windows is a huge, confusing and absurdly overcomplicated mess, something Linux can only aspire to. As someone who regularly helps non-technical people with administration type tasks, I cannot imagine how a novice user can function with Windows, even Windows 2000/XP, which I consider to be pretty good overall, unless the Windows 95/98/etc side of things which was complete garbage from day 1.

      Obviously if I totally hated it and couldn't deal with it, I would stop using it (there also is this little fact that my livelihood is based on programming for Windows), but MS has all the organizational skills of a herd of cats and everything about Windows, good or bad, is deeply engrained with design-by-committee thinking. I've spent a fair amount of time playing with Linux back in the 90's. Yes, it was confusing, and often disorganized, but it has two advantages that MS will never have.

      1. Better documentation (HOW-TOs, etc)

      2. An underlying philosophy of logical, simple and clean design. Just the mere idea that software can be completely configured though ASCII config files and most useful functionality can be controlled without leaving the command-line makes it more powerful and flexible than a GUI could ever be. In my opinion GUI design is still in its infancy and has actually _devolved_ in the last 10 years, thanks in large part to the WWW and improved graphics. A good command-line and ASCII files will never succumb to the whims of style or pointless "skinning" (have you seen the visual mugging that is Windows Media Player lately... I finally had to dump it for Media Player Classic, for years the app itself has acted as if it is more important than the media it's supposed to be playing. MS has some great UI designers, and has make some good innovations, but apparently they fired them all around 2000 and replaced them with fashion designers, witness the eye-gouging ugliness of the default XP theme, it's like a Paris fashion show of UI, some weirdo's idea of good UI that no one in the real world would actually choose).

      Anyhow, I didn't mean to rant so long, but ease of use is a big issue with me, and MS, which claims to have that as a high priority is actually, in my opinion, going backwards.
      Sure, computers can do a lot more than they did in 1984... orders of magnitude more, but are they really that much easier to use, or more importantly, to set up and fix? I don't think so, and I was there.

      --
      You are in a maze of twisty little passages, all alike.
  31. Yuch by SmallFurryCreature · · Score: 1
    If you can't see the difference between the two you have done to much html editing. The first is human readable, the second is not. Yeah yeah I know it is "readable" but come on.

    If you want to change /etc you are going to have to convince vi or even ed users like me. xml ain't gonna do it. We use vi because emacs takes to many keypresses to start. We are not going to type the variable name twice. No way. Try again.

    /etc is a mess wich could first be slightly cleaned by moving every config file into a subdir with the same name as the app. This would at least reduce the number of entries and avoid problems with designers naming essential config files something else then app.cfg. Yes I am talking to you mplayer.

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

    1. Re:Yuch by Ogerman · · Score: 1

      If you want to change /etc you are going to have to convince vi or even ed users like me. xml ain't gonna do it.

      I fully agree. Head on over to Elektra's website, http://elektra.sf.net, and ponder the alternative of breaking configuration down into a standard file hierarchy much like /proc or /sys.

      And it would be trivial to re-combine everything into a single list for rapid text editing.. just traverse the tree. I'll bet an editor for this would be mere weekend project in Perl.

      Elektra + optional XML meta-data now!

  32. Partially fine as it is by zaunuz · · Score: 1

    In my humble opinion, I say that /etc is partially fine as it is. As someone said earlier, atleast you have SOME idea about where your configuration files are. However, since I am a fan of tidy filesystems, I would say that /etc should be as it is, but with a few modifications. For example, files needed to run the system (passwd/shadow, ppp.conf, shells, groups, and such) could have their place in /etc while other applications' configuration files could be moved to a subdirectory. The same goes for other files. Myself, I think this could be a good idea, as long as it does not create a ton of subdirectories and become way too messy. If it is kept simple, the way the idea behind /etc originally was, it could work.

    --
    this is probably the most boring sig in the world
    1. Re:Partially fine as it is by Will2k_is_here · · Score: 1

      So this thread sparked me to do my own review. I never really thought there was a problem with it but I see where the author is coming from. Seems to me from doing ls /etc that the apps are doing a great job. I have a gimp directory, a cups directory, a gaim directory, etc. That is an execellent solution because on the one hand, I know the config file I have to edit is inside /etc somewhere, but it doesn't make the directory "messy" by creating a ton of .conf files. It seems the failures here are the distros because out of all the other files in there, they are either present thanks to UNIX history (/etc/passwd) or because the distribution put it there (/etc/issue, /etc/motd, /etc/redhat-release, etc.)

      So I agree with you, /etc is close but not quite there. I think the directory needs:
      1. Exactly ONE directory for every application that requires some kind of config files
      2. Exactly ONE directory for necessary distribution settings
      3. Each config file should be of the form fileName.conf as is the current convention
      4. ONLY subdirectories in /etc to begin. Should the admin wish to use a file in /etc, the admin should use ln -s.
      5. In a somewhat similar fashion to HKEY_LOCAL_USER, I want my .whatever files conglomerated into a .etc/ directory which follows the same conventions as the above. Actually I think any program at all should try to find a .etc/appname/configFile.conf first, if it isn't there, it should fall back on /etc/appname/configFile.conf (system services/non-login programs could either refer to /root/.etc/appname/configFile.conf or could be forced to use the default /etc/appname/configFile.conf).

      The last point is pretty important because those .config files are just as much a problem as /etc. I did a count on my home directory and I have 90 (!) hidden files.

      The real key is: "How to we make anything the convention in *nix" especially while Linux branches as many times as it wants. We need to find a set of big names who do Unix/Linux and get them to agree on some kind of standard to follow for directory structure (W3C style!). I don't know, sounds like it's something we'll have to live with.

      (I know I'm getting pretty specifc on Linux here. I have little experience with any other *nix types so I welcome any corrections)

    2. Re:Partially fine as it is by zaunuz · · Score: 1

      Well as a FreeBSD-user, I dont see anything that needs to be corrected in your post, since most of the mess in /etc is standard on all UNIXes =)
      Anyway, i couldnt agree more.

      --
      this is probably the most boring sig in the world
  33. Really a problem? by SunFan · · Score: 1


    For most services, a simple cut and dry config file is all that is really needed. This has worked for many years, and most of the problem can be solved by having good manual pages for each of the files (see OpenBSD for good man pages).

    For the few problems that need a more complex solution, then those can be taken on a case-by-case basis. For example, Sun revamped the whole init process with SMF, replacing many separate files and directories with a few command line tools. Of course, there is compatibility for "legacy" apps, but the rc directories and inetd.conf files are much much smaller, now.

    Replacing all the /etc/ files with XML equivalents is not a solution, because UNIX has been around for 30 years, will be around for another 30, and XML is not even a teenager, yet. It is also hellish in vi.

    When it comes to /etc, KISS really is the best approach, IMO.

    --
    -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
  34. Why it will continue to be a mess. by SmallFurryCreature · · Score: 1
    I think the poster wants something like the windows registry. Fair enough. Windows registy is were all programs store their settings and seems to work. Except wait. No it doesn't. Windows registry is so easy that to store a 1 you really got to write x000001 or something. Yeah that is noob friendly. Also many programs especially games use both the registry AND .ini or .cfg files. Some games even use multiple AND put them sometimes in the game install dir and sometimes under the Home dir of the user. Documents or something.

    Oh lets admit it, windows registry is an even greater mess. At least /etc support bloody goddamn fucking comments. Something MS apparently thought nobody would ever need.

    But what about all those different file formats. Mmmm well yes true enough. They are really not all that different though. Most of them have 1 pure text file seperated into sections for easier reading and each entry is something like "setting = value" contruction. The better config files have lots of comments to indicate possible values and what they mean. Very easy for humans to use. I generally find editing a config file to be a breeze.

    The problem is between updates. I get the idea that the poster is using a gentoo and gentoo has a thing for updates. Gentoo updates a lot and for some reason config files change a lot. Not a problem with config files you never touch youreselve just accept the updated one but with things like /etc/fstab samba or apache configs it becomes more complex.

    For a long time gentoo insisted on constantly changing /etc/fstab despite the fact that the format never changed, no new options were ever added and all the settings are purely individual. Thank god they changed this but they still insist on giving me a new config file for each time samba or apache gets installed. Now some of the changes are security related and important but an awfull lot seem to be pure preference by whoever this time did the config file. Finding out the differences ain't easy. Often they are purely syntax differences anyway. Diff is a nice tool but can't understand human reasons for why lines might be in a different order.

    So merging new configs and your existing config is indeed a mess. A better way to do this would indeed be usefull.

    This however HAS ABSOLUTLY NOTHING TO DO WITH /ETC. The exact same problem occurs on windows with its registry. You see the simple problem is this. Say I got a config entry that says, foo=bar. Now during an bugfix it becomes clear that for 99% of users this should be foo=bar2 instead. How do you change this? Just overwrite what is there? No because for mee foo=bar might be what I need and I don't want an upgrade to change my settings. Ignore? But then I am never alerted to the fact I am using outdated settings. Alert me? Well nobody seems to do that.

    Ideally during an upgrade the installer would go through the existing settings and analyze them for correctness and alert the user to changes.

    It is not a gentoo specific problem either. If you install apache by hand it just leaves the old config untouched. Windows throws a dice during boot to see what it does with your settings. Games just overwrite if they feel like it.

    Don't mistake messy dir structure with lousy upgrading of configuration settings.

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

  35. dispatch by Apreche · · Score: 1

    I don't know why you are using etc-update. Everyone I know uses dispatch-conf. It's widely accepted as the smartest way to handle etc. Sure, there are probably easier ways to handle etc, but you're never going to get everyone to standardize on any single thing.

    The best solution I see would be to have some sort of XML/database kind of solution and have a nice gui tool and a command line tool to configure everything with a tree-like interface. Something like the GNOME configuration editor but fuller and better. Since all the tools are open source you just have to modify each piece of software to use the database instead of its own default. This would probably result in an entire new distribution of *nix with custom builds for everything with patches to support this.

    But to be perfectly honest, I kind of like the seperate txt config files for everything. As long as all of them are in etc and named and organized appropriately. And as long as the format of the file is intuitive and simple with appropriate documentation it's all good. The real problems are programs like apache which have needlessly complex and bastardly configuration files that require tomes to understand. KISS like mplayer or Xorg.

    --
    The GeekNights podcast is going strong. Listen!
  36. Diversity is fine... by Froze · · Score: 1

    What is missing is an automated versioning of everything in /etc

    I don't have an issue with multiple file formats, like another poster said, find and grep do the job quite nicely. However, what I don't like is that there is no history of modifications. No single way to undo any modification.

    My proposal is to leave format of /etc as free wild as it is, but! put the whole directory under a filesystem based revision control like http://www.ext3cow.com/

    --
    -- The morphemes of your disquisition are ascertainable, but they have eschewed an ambit of transpicuous exposition.
    1. Re:Diversity is fine... by tverbeek · · Score: 1
      Ye Olde VMS has a fairly simple and elegant form of revision management built into the file system. It just appends a version number to every file and keeps the X most recent versions*, right there in the directory, each fully accessible. If you specify only the filename (without the version suffix) it uses the latest version. If you bork up a file and want to revert, you just delete the latest version (del httpd.conf;37) and the previous version (httpd.conf;36) becomes the latest one. If you want to compare the current version with the previous version (or the one before that...) just use your favorite diff tool on them. It's a feature that deserves to be borrowed by other OSes.

      *X can equal 1 if you want, or you can manually purge older versions.

      --
      http://alternatives.rzero.com/
  37. NO XML! by jgardn · · Score: 1

    You people who have been suggesting XML have no idea what the deficiencies of XML are. Remember, there are some tiny programs that need to access files in /etc/. Do you want to inflate the size of these programs by 10x just to read a simple conf file? Or do you want some dependency on an XML library in order to run basic system services? Or would you rather use a dialect of XML that can be parsed easily? If you can't name ten problems for each of these scenarios, you shouldn't be suggesting what to put in /etc.

    I would prefer a simple file format (not XML) that can be parsed in very few lines of C code in /etc. No external libraries. No unreadable XML crap. Something simple and easy.

    Oh wait! We already have that! If you do a survey of what file formats are actually used, you'll note that they come in a handful of formats. You have your database files (/etc/passwd and friends). You have your simple config files (/etc/resolv.conf) and you have your more complicated ones that are specific to the application (/etc/httpd, /etc/selinux, etc...)

    These files all look different because they are built to do different things. What is so difficult about this concept? We have JPEGs and GIFs and PNGs and all kinds of formats for images. We have TXT and SXW and HTML and PDF and PS and DocBook and DVI and Tex and what else for generating text. Why? They all serve different purposes.

    Free Software is about choice and diversity. Get over it. We are always going to have choices, and the more choices we have, the better. If that bothers you, go back to Windows where you choose nothing, or go live in Cuba or North Korea.

    Choice is good!

    --
    The radical sect of Islam would either see you dead or "reverted" to Islam.
    1. Re:NO XML! by Anonymous Coward · · Score: 0

      You people who have been suggesting XML have no idea what the deficiencies of XML are.

      Oh yes, of course, it's not like many of us work with it every day. Thank God we have an enlightened soul such as yourself to show us the error of our ways!

      Remember, there are some tiny programs that need to access files in /etc/. Do you want to inflate the size of these programs by 10x just to read a simple conf file?

      "Size" in what sense? Lines of code? Memory use? Disk space?

      Or do you want some dependency on an XML library in order to run basic system services?

      What's the big deal about depending on an XML library? You already depend on other libraries for basic system services.

      If you can't name ten problems for each of these scenarios, you shouldn't be suggesting what to put in /etc.

      You haven't named one, let alone ten.

    2. Re:NO XML! by Brandybuck · · Score: 1

      I would prefer a simple file format (not XML) that can be parsed in very few lines of C code in /etc.

      My favorite config format is what I jokingly call "Bourne Format." It's a series of "KEY=value" lines, which is read in by the script with a ". app.conf" command. Don't laugh, it works!

      --
      Don't blame me, I didn't vote for either of them!
    3. Re:NO XML! by GreyWolf3000 · · Score: 1
      You know, even if the rest of the script/program would be easier to write in {perl,python,c}, I find myself often using Bash just because of this feature right here.

      Why do I feel like thousands of geeks suddenly burst out in laughter?

      --
      Slashdot: Where people pretend to be twice as smart as they really are by behaving like children.
    4. Re:NO XML! by kwerle · · Score: 2, Interesting

      You people who have been suggesting XML have no idea what the deficiencies of XML are.

      Please enumerate them. I recommend something like
      <ol>
      <li>first</li>
      <li>second</li>
      <li>t hird</li>
      </ol>

      Remember, there are some tiny programs that need to access files in /etc/. Do you want to inflate the size of these programs by 10x just to read a simple conf file?

      It's a shlib. It's in memory already. Get over it.

      Or do you want some dependency on an XML library in order to run basic system services?

      Yup. Just like libc (or whatever they call it these days), libposix, etc.

      These files all look different because they are built to do different things. What is so difficult about this concept? We have JPEGs and GIFs and PNGs and all kinds of formats for images. We have TXT and SXW and HTML and PDF and PS and DocBook and DVI and Tex and what else for generating text. Why? They all serve different purposes.

      And all those image formats get us what, exactly? Wouldn't it be far more convenient to standardize on one? If you had listed a vector format, I may have said 2, but all those are just different ways of representing M bits of color and N bits of alpha for X by Y pixels and Z frames. I don't care about what compression is used - just flag the format and be done with it. In fact, I think that's a perfect example of arbitary, meaningless, and bad choice.

      The text formats you list server 3-4 purposes, but there are 8 listed. Yup, I think it'd be nice to reduce that list, too.

      Choice is good!

      No. As others have pointed out: arbitrary choice is bad. Meaningful choice is good. The OSS world has far too much arbitrary choice in it.

  38. Do you even know the first thing about XML? by Anonymous Coward · · Score: 0, Flamebait

    The XML version is harder to read than the .ini version.

    That's a matter of opinion, and can vary greatly depending on what data you want to store.

    It's hard to tell at a glance if the config is a valid config.

    The same applies to proprietary syntaxes. The only difference is that XML has clear rules for treating syntax errors, and has many tools to automatically check syntax. Some editors even do that for you automatically when you save, or don't let you create syntax errors in the first place.

    It is also harder to edit using command-line tools. It is harder to edit with ANY common unix tool, actually. You *must* use editors that understand XML

    I'll stop responding here, since it is plainly obvious that you don't even know the first thing about XML. To cut a long comment short - you are clueless and utterly wrong.

    1. Re:Do you even know the first thing about XML? by Anonymous Coward · · Score: 0

      For whoever modded me flamebait:

      The statement "You *must* use editors that understand XML" is entirely 100% false, and it is one of the very first things you learn about XML. You can edit XML files in notepad, vi or emacs without any problems.

      I had a very good reason for saying "you are clueless and utterly wrong" (which is what earnt me the flamebait label, I presume) - the person I was responding to has either never used or even seen XML, or was deliberately lying.

  39. Bigger Issue by NullProg · · Score: 0, Offtopic

    /etc is not an issue with LSB complant distributions.

    A bigger issue is how we prevent less than average user from having thier linux machine become a host owned by the seedy people .

    Maybe this isn't the forum, but it needs to be discussed. Not from the kernel or services perspective either, just from the Joe/Jane user context.

    My thoughts?

    - We should not pester the user too much. My parents turned off Zone Alarm because they got tired of the pop-up warnings. (I know you can turn it off, but I didn't and left and they disabled it).

    - Any program that connects to the internet needs to su to a different user context after initialization (like apache, thttpd etc.). This should prevent the application from overriding the user files because of a bug/flaw.

    - Programs not started by the user with a click or run command should not be allowed to execute. Could Gnome/Kde implement such a feature?

    - After X login, I have a script that copies my .xinit/.xsession files from the hidden safe directory before kde/xfce/windowmaker start. Maybe this should be standard?

    I don't know all the answers, this is just a topic for discussion. Lets start a thread on how you would implement user level safety while still enjoying the benefits of Linux.

    Enjoy.

    --
    It's just the normal noises in here.
  40. Mac OSX Solution by eyeball · · Score: 1

    Mac OSX (ok, I'm sure this dates back to {Open,Next}Step) has a nice solution. Preferences are stored in an XML formated file, typically (but not necessarily) one per application. Global preferences are stored in /Library/Preferences/foo.plist, and user-specific preferences are stored in ~/Library/Preferences/foo.plist. Also, the convention is to make the file name unique by combining it with a domain name, like com.apple.SomeApplication.plist. Of course this is on top of the normal unix /etc/ files and doesn't exactly replace them, but it's a nice system that could be adopted.

    --

    _______
    2B1ASK1
    1. Re:Mac OSX Solution by klui · · Score: 1

      NeXTSTEP/OpenSTEP never used XML. Stuff was kept in a defaults textfile database. They have carried over the name Property List over to OS X but its contents format has changed. http://www.vorlesungen.uni-osnabrueck.de/informati k/shellscript/Html/Man/_Man_NeXT_html/html5/Proper tyList.5.html

  41. Use the filesystem! by spitzak · · Score: 4, Insightful

    How many times do people have to come up with crazy ideas like XML and Registries or even elektra.

    It's easy: make a file for each key and put the literal value (not encrypted or encoded or anything) into the file. Want the "registry key" foo/bar/baz? Look in ~/configuration/foo/bar/baz, and if it is no there look in /configuration/foo/bar/baz. Read the contents of the file. DONE!

    The filesystem already supports a totally arbitrary name hierarchy, and the data is allowed to be blocks of bytes of arbitrary size. YOU DO NOT NEED ANYTHING ELSE!

    Comments could be supported by renaming the file baz to baz.comment. You could also document the expected structure of each directory with a .template file in the parent directory. Many other ideas could be added. The important thing is all this structure can be IGNORED by a simple program that just wants to read configuration.

    Elektra is close, but the files are not raw data.

    I don't understand why this solution is not absolutely obvious to everybody. What is the problem? Why is anybody proposing anything other than this?

    1. Re:Use the filesystem! by Brandybuck · · Score: 2

      YOU DO NOT NEED ANYTHING ELSE!

      Except, of course, the requirement that may no longer use any old file system. When you use one inode per key, you're going to quickly run out of inodes. Especially when you've made your root filesystem tiny. You can, of course, use a really small inode size for the root filesystem, but that's going to affect everything else in the filesystem. To avoid wasting huge amounts of space, you're going to have to make your inodes ridiculously tiny. And even after I do that, what's the justification for tuning my filesystem to /etc instead of everything else that resides in the filesystem?

      Why not just use multiple keys per file? Like we do today? You idea has been proposed before. And rejected before.

      --
      Don't blame me, I didn't vote for either of them!
    2. Re:Use the filesystem! by Lars+-1 · · Score: 2

      This proposition is short-sighted as best.
      By this logic, one could eliminate the need for many simpler database applications, mail storage systems, and other stuff.

      When you think about it, you can probably convert most storage needs into versions which use the filesystem only, yet filesystems have their limits. The idea of a file is to put more than just one key in it. This is how the filesystem is dimensioned and tools have been made to manage the filesystem. Yes, you can misuse the filesystem for other things.

      Things which only make sense in a context are usually tied together into that context, and a file is only the way to make a context persistent. This does not mean that a directory is a simpler way to make that context, altough it may appear so.

      If we take your idea a step further, think about the huge data structures a filesystem has to maintain when the number of files explodes. It does not make sense.

      Put information into the files, that's what they are made for.

      Lars

    3. Re:Use the filesystem! by vadim_t · · Score: 1

      Well, if this gets old filesystems phased out faster, I'm all for it.

      There's no good reason why the filesystem should limit the amount of files you can create. That's just plain insane. The only good limits on how many things you can have are: zero, one, and as much as fits in storage.

      I'd recommend taking a look at ReiserFS, which despite the 32MB journal still freed about 100MB of space when I converted a 1GB ext2 partition to it. Besides, the vast majority of the files on a Linux system is *small* files, not big ones.

    4. Re:Use the filesystem! by Lars+-1 · · Score: 1

      This is very theoretical.

      In practice, you have to assume some parameters when designing your file system: Read-to-write-ratio, file size / number of files ratio, etc.

      There probably is not a one size fits it all solution for files.

      Your example picks a scenario where ReiserFS performs well. I sure one construct other scenarios where ReiserFS performs less good than other FSs. This should not be used as evidence that ReiserFS does not care about numbers of files on a partition.

      Lars

    5. Re:Use the filesystem! by vadim_t · · Score: 1

      Why very theoretical?

      Take a look at a typical Linux installation. There are hundreds of thousands of files, and it's not an exageration. I just counted and I have 420906 on my laptop. For instance, /etc, lots of libraries, lots of binaries, documentation in /usr/share/doc with several files per package. Lots of distributions use a lot of files for packages (Gentoo for instance). For a typical user, this is where the the problem is. Hundreds of files have to be accessed while booting, for instance.

      Now, large files are a lot less common. On my laptop, the average size of a file is 54KB, and it would be lower if not for the 5GB vmware VM. Also, with large files often performance doesn't matter all that much. For example, mp3, video, big tar.gz files, big graphics, etc. Yeah, there are applications where you want to get really good performance from big files, like when you deal with video processing and such. For this there is XFS. But normal users don't care that their mp3/DivX are being read a bit slower than they could be, as it happens faster than they are played anyway. Typical users don't spend the day copying gigabytes of data around. The users do find having 10-20% of slack space and bad performance on large directories annoying, though.

      With my 420906 files, assuming a 4KB sector size, and an average of 50% waste on the last block, that gives 822MB of wasted space, of 40GB. ReiserFS nicely avoids that. And it looks very favorable in benchmarks too.

    6. Re:Use the filesystem! by mikrorechner · · Score: 2, Insightful


      I don't understand why this solution is not absolutely obvious to everybody. What is the problem? Why is anybody proposing anything other than this?

      Sounds interesting, but editing a program's configuration would be a royal pain in the ass with this system. Right now, I can open the conf file, browse through it, read the commentaries and change what needs to be changed. With your proposal, I would have to open a new file for each setting, plus one for the commentary. Unless, of course, there is a special editor for this.

      --
      "Oh, a lesson in not changing history from Mr I'm-my-own-Grandpa." - Dr Hubert Farnsworth
    7. Re:Use the filesystem! by drinkypoo · · Score: 1
      It was a bad idea before we got modern filesystems like reiserfs that will allow you to have tons of very small files with low overhead.

      On the other hand, a reasonably constructed config file format is really not hard to deal with at all. The solution is to have a good manpage for the config file format, and to put a comment in the top of the example file telling you where to find it.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    8. Re:Use the filesystem! by Lars+-1 · · Score: 1

      It's theoretical because you are assuming that the number of files does not influence the performance of a file system. Just because ReiserFS handles many small files efficiently, it does not mean that it would be even more efficient to have less files.

      When it comes down to it, the task for a file system is mainly for localizing individual files (and maintaining storage efficiently). I think that there is no need to further split up information which the client (the application) would need together anyhow. If the information belongs together (like configuration settings), put it into one file, use the filesystem to localize the file, then read the whole file at once.

      That's how the filesystem is designed to work. Splitting up things into many small files when there's no need just causes a lot of more file system calls to happen. This is inefficient.

      One could now argue that one should put everything an application needs into one file, because this would be even more efficient. But for all practical purposes, one ends up putting things belonging to the same context into one file (have a look at /etc/samba/*), but still use several files because it's just intuitive to separate things by the context.

      Lars

    9. Re:Use the filesystem! by vadim_t · · Score: 1

      The number of files does influence performance, but I don't think we should care about that. It's not like applications spent the whole day parsing and re-parsing their config files, so the performance hit, even on ext2 should be minimal. No filesystem I can think of has a significant performance in these conditions.

      Some like ext2 do have problems, but only when there are thousands of files in a folder, which is a lot more noticeable in programs like mail servers. AFAIK, ext2 should handle these split config files just fine.

      And really, who cares about the efficiency of loading config files? It's possible to use even fewer syscalls: just read a struct from the file directly into memory, in one go. But nobody does that, because while the approach is very nice for the programmer it sucks for users and administrators.

      With any relatively modern hardware, parsing a config file is for all purposes instant, unless you have something really weird, like several MB of XML. I think one millisecond or two added to the startup time of my program is not a bad price to pay for a configuration that is easier to parse, maintain and upgrade.

      Honestly, I don't care how the filesystem "was designed to work". The filesystem exists to provide a useful service to the user. If it can be used in some new interesting ways, then I don't see anything wrong with that even if it deviates from the original idea. I learned programming so that I could do interesting things and improve existing ones, not to be a slave of how something was "designed to work".

      Resuming: All your objections seem to be a non-issue to me so far. Any increased overhead from all of this would be insignificant especially when compared to XML. And if it somehow turns out to be too much then we'll fix it.

    10. Re:Use the filesystem! by Anonymous Coward · · Score: 0

      Hans Reiser hopes to change that view. Computers are advanced enough now for us to quit worrying about filesystem issues. The computer should be smart enough to figure out what we're doing with it and accomodate, or at least accept hints about how we are using it.

  42. The key is APIs by MobyDisk · · Score: 1
    We need APIs for accessing configuration data instead of relying on static file locations. That leaves programmers free to change the locations and formats of files in the future without breaking compatibility. And it leaves distros free to put the files wherever they want. And it allows standard tools and installers to find and update the configuration data. While still preserving the ability for sysadmins to manually edit the files.

    Then you can make some simple command-line tools would make it easy for admins to find configuration files if they forgot where they are.

    root>sysfindconfig eth0
    /etc/network/config.file

    This is one place where Mac and Windows have a benefit. There are standard APIs for configuring most things (even though Windows keeps the files hidden in a massive and ugly registry). It makes it easy to write reliable configuration tools. We don't have to have a big registry to do that. Just some nice wrappers on top of what we have would be good.

  43. It's not /etc by RoadkillBunny · · Score: 1

    I don't think the problem is where the files are placed. It very easy for me to find the config for a program that I never used because all I have to do is look in /etc and it's mostly there.

    --
    Cheers,
    RoadkillBunny
  44. clean /etc by rubycodez · · Score: 1

    I use FreeBSD, so my /etc is nice and clean. But my /usr/local/etc/ is pretty ragged....

  45. Koan by nathanh · · Score: 2, Funny

    A master notices his young apprentice in a state of obvious distress. "What troubles you, my apprentice" asks the master. The apprentice replies "I am fed up with the mess that is /etc. There are dozens of file formats, all of them incompatible, and most of them are difficult to apply changes to automatically".

    The master calmly asks the apprentice, "How would you solve this problem?" The apprentice thinks for a moment and then excitedly blurts "I know, I shall invent a new configuration file format that will be in all ways superior to the existing formats. Every application will use my format and there will no longer be any problem".

    The master quickly strikes the apprentice on the head with his bamboo discipline rod. "You fool, then I would have to support yet another incompatible file format".

    And the apprentice was enlightened.

  46. The problem by drsmithy · · Score: 1

    The problem is that the unholy mess that is /etc is one of the primary ways unix administrators assure their job security. Until these attitudes (already expressed prolifically in comments above) change, /etc will remain inconsistent, poorly documented and problematic.

    1. Re:The problem by Anonymous Coward · · Score: 0

      You hit the nail on the head! As long as *nix continues to be fully user configurable and open ended, *nix administrators will have jobs different in scope and practice from Windows administrators.

      I would ask everyone how they would make bind zone files fit into the same format that emacs uses, which can also be used to configure apache? If you can, what's the point? Is there anything common to these programs that warrants compatibility of file formats?

  47. my solution by Zork+the+Almighty · · Score: 2, Funny

    I just deleted /etc because it was pissing me off. Now I'm posting from a Windows machine. Why won't anybody give me root access ?

    --

    In Soviet America the banks rob you!
  48. All apps should use sendmail.cf syntax by Anonymous Coward · · Score: 0
    from TFA: Each program has its own (incompatible) config file format

    So they should simply pick a syntax that's been standard for a long time; and all use that. I propose sendmail.cf; since it's quite powerful.

    Or... how about XML. Then /etc could blow up to a few gigabytes and we could sell more hard drives.

    More to the point, the article's premise that "/etc is a mess" is simply wrong. Different applications have differing needs; and there's nothing wrong with reading the man page to know what its config files should look like.

  49. Why I don't have a problem with /etc by phaze3000 · · Score: 3, Insightful
    Personally, I don't consider /etc to be a problem. /etc is a directory to be edited by the system administrator, and as a system administrator, one should damn well know what one is doing editing config files. End users shouldn't have to touch these files.

    I fail to see how a 'common format' is going to help anyone - it's not the format that causes head-scratching, it's working out how to achieve what one wants using the options available.

    Because of the simple text file nature of /etc one can easily place the directory into some sort of revision control system (RCS, CVS and the like), making tracking of changes extremely simple.

    --
    Blaming GW Bush for the Iraq war is like blaming Ronald McDonald for the poor quality of food.
    1. Re:Why I don't have a problem with /etc by Anonymous Coward · · Score: 0
      Personally, I don't consider /etc to be a problem.

      Good for you. Just about every technology I can think of from the past 100 years that was replaced by something better had the same thing said about it.

      Progress is made not by people who say "Well, it's good enough for me", but by people who say "Hmm, I think I can make this better..."

      /etc is a directory to be edited by the system administrator, and as a system administrator, one should damn well know what one is doing editing config files. End users shouldn't have to touch these files.

      Ever since this thing called the "PC" came along, most people are their own system administrators. Several things in my /etc need to be edited just for reasonable use of the system. So saying "that's geek territory" doesn't cut it.

      Editing these things in /etc is something I could never teach my mom to do, but nor should I have to. On a Mac, setting up a printer or a UPS or a network card or a graphics tablet doesn't require editing config files.

      So if you want to declare /etc geek territory, you're going to need to move a lot of things out of there first.

  50. That looks cleaner than my home folder... by ultramkancool · · Score: 2, Insightful

    my home folder has like 352 items in it + my other 2 home folders (for myself with differnt usernames (because of all my distro changing)) it's 690. now /etc only has 210 it's no mess

  51. Registry on Linux by fluor2 · · Score: 0

    I really love the registry on Windows. It's fast, flexible, and Microsoft have allready defined a standard by their included programs, and Office. I hope Linux sooner or later would like to use this stunning registry-database.

    Please dont give me the shit about registry corrupts and similar, there's no problem with this now. It works nicely atleast on our atleast 8000 clients

    1. Re:Registry on Linux by TheZork · · Score: 1

      Microsoft doesn't always follow its own conventions within the registry, and anyone who's ever worked with real-world MS registries knows that plenty of vendors - big and small - don't either.

      At least /etc is file-based and human-readable. I can manipulate it myself, and I can clean it up as I see fit. I can also do cool things like move code around and know where config updates need to happen or even copy a piece of software wholesale to another box and be pretty sure that I've gotten all of the bits in the process.

    2. Re:Registry on Linux by MeerCat · · Score: 1

      I really love the registry on Windows. It's fast, flexible, and Microsoft have allready defined a standard by their included programs, and Office. I hope Linux sooner or later would like to use this stunning registry-database.

      ROFL

      Can I grep the registry ? No...
      Can I add comments to registry entries (such as "what the previous setting was" ? No...
      Can I easily backup a small part of my registry, while keeping it commented and grep-able, to try something and restore it later (or copy settings to another machine) ? No...
      Can I set easily set and review access permissions to permit no-access/read-only access to selected parts for selected users ? No... (I know I can set ACL's but where's my simple ability to review this alongside the permissions of other system components like.. say.. the file system).
      Will Windows refuse to load if certain parts of the regsitry get too big ? Yes..
      Does the registry keep seperate sections that hold user intent, system defaults, and dynamic information such as plug and play info ? No...

      And if anyone is going to point out that regedit/regedt32 etc HAS got a "find" function, or "I could write one myself" then I think they've missed the fundamental point I'm making.

      The registry has been "useful" for one thing only - the god awful mess that is the admin of COM classes, but I'm betting if there wasn't such a horrible nasty pokey little hole of filth hidden away from most users, the authors of COM would have had to come up with something just ever so slightly tidier, less fragile and more tolerant of change.

      I hope the registry dies a quick and painful death, real soon now.

      And relax ... deep breaths ...

      --
      I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
    3. Re:Registry on Linux by Anonymous Coward · · Score: 0

      How do you automatically install and administor arbitrary software to those 8000 clients? Without making end users do anything whatsoever, or going to each computer yourself to apply settings? How do you modify user's registry settings without kludges like RunOnce batch files everywhere? Or do you just leave everything set to the Microsoft Way, complete with annoying balloon help windows and other cruft?

      Windows is fine if you have a few thousand clients using Windows and Office and that's all. For anything else, it's a pain in the ass.

    4. Re:Registry on Linux by Anonymous Coward · · Score: 0

      If I'm missing your point, you should have made it in a way other than stating a bunch of lies about the registry.

      You CAN grep the registry. It's called find. If you're looking for something in the registry, you're going to be using a registry editor, so don't whine that you can't use X utility to search it.
      You're right, you can't comment IN the registry. It's there for configuration info; if you have something to remember, make a note.
      You CAN backup a small part of it and restore it later or install it to another machine. It's called export/import, and it generates small human-readable, logically arranged textfiles.
      You can't set user permissions for different keys, but that's part of the Windows paradigm. Only an admin should edit the registry. Also, it does keep separate sections, just not partitioned the way you mentioned because, surprise, it's not *nix.

      I'm intrigued by your allegation that Windows won't load if some sections get too big though... I used Win98 for years, and near the end, my registry was around 15MB. It didn't cause failures to load, or even an appreciable slowdown. The rest of the OS was another story of course, but even for an OS where the registry was relatively new, it wasn't an issue. ...besides, the inclusion of the registry never meant denial of program-managed config files either. Plenty of programs kept using INI/CFG/DAT/??? files to store configuration info. That just meant that in many cases the config files weren't user-changable as they'd be in some proprietary format.

      So of course it's going to look bad if you're ignorant of most of its features. It's the same as a Windows user moving to Linux and writing it off because you "can't do anything in it." Sure you can, you just need to RTFM... and when it comes to the registry, "TFM" could be a page or two.

    5. Re:Registry on Linux by MeerCat · · Score: 1

      I do believe I said: And if anyone is going to point out that regedit/regedt32 etc HAS got a "find" function, or "I could write one myself" then I think they've missed the fundamental point I'm making. which means that, before you wrote your first point, I'd already discounted it. Does grep or any other standard tool work on the registry ? No...

      "A bunch of lies" - yeah, that's right, I have nothing better to do with my time than invent some lies - look how inventive I am.

      I'm intrigued by your allegation that Windows won't load if some sections get too big though... I used Win98 for years

      When you've finished home computing try the world of business, have you heard of NT, Win2000, XP perhaps ??

      http://support.microsoft.com/default.aspx?scid=k b; en-us;269075

      One single p'n'p driver error writes too much data to the registry and windows itself cannot boot even to the stage of being able to recover the registry (and yes, I've had this happen to me, 3 times with commercial drivers) - "real world" file systems have external recovery tools, where's the equivalent for the registry ?

      So of course it's going to look bad if you're ignorant of most of its features.

      Ho ho ho ... so are you in fact Jeffrey Richter Mr A/C ? Or are you Mark Russinovich ? Or who ? Yeah, you tell me what M to RTF and me, I'll just take my years of experience of programming Windows (I started using it at 1.0, but didn't start programming it until v2.0 - how about you) and I'll shove it up my arse, clearly I am in presence of greatness.

      --
      I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
  52. This will fail (again). by Lars+-1 · · Score: 1

    This (good) idea will fail again, because IMHO the people involved are too short-sighted.

    Main points against this proposition include:

    - It has worked to far, no need to change it.
    - Why yet another key-value format? The old one does all we need.
    - I hate XML. It's a hype, and that will pass.

    My points for this proposition:

    - It has worked so far, but maybe there is room for improvement?
    - XML gives you more than many other key-value-formats, namely namespaces and proper escaping.
    - Get over the XML-is-a-hype. Try to look at the benefits neutrally, then use what's best to do the job. IMO, XML is a code like ASCII (on top of a charset). Anyone who proposes that he can read a text-configfile with any editor is really using a tool to convert the data into ASCII. Well, I can read any XML file with any text-editor, or I can read it with nice formatting because XML is so machine-readable.

    In my opinion, the mess in /etc may not need to be cleaned up explicitly. Instead, use a proper system-wide and POSIX-standardized API for implementing a defaults system which gives the user/application programmer/sysadmin benefits so he is inclined to use the API.

    Benefits could be:
    - No self-made serializing/parsing system needed.
    - Platform-independent defaults system.
    - Forget escaping or namespaces. The API provides that.
    - Installation-specific or user-specific overriding of values.

    The API could use a user-defined file format, but probably XML does all you need.

    Provide tools for the grep-happy people to search the config-files.

    But again, this will fail, mainly because the people involved are not looking for benefits of an improved system.

    Lars

    1. Re:This will fail (again). by Anonymous Coward · · Score: 0

      Get over the XML-is-a-hype. Try to look at the benefits neutrally, then use what's best to do the job.

      OK, I did. XML still sucks. If you take away the hype, YAML appears to be a much better solution for configuration files. It provides the benefits of XML you mention, but is simpler, easier to read, and is more consistent and line-based so it's even more "grep-happy" for you.

      In this application, XML's hype seems to be the *only* thing going for it.

    2. Re:This will fail (again). by Anonymous Coward · · Score: 0

      Essentially, a bunch of wrappers like those used above passwd, shadow, and group? Sure, that would help. But you're still left with the fact that configuration files are essentially just a list of name/value pairs and some context (free/sensitive) languages for more complex config files. That's all /etc is. To actually standardize configuration will require modification of every configurable tool in Unix. How much work is it to update every Unix tool versus looking at a man page once in while? If you really want to make these improvements to Unix, please do it! Right now people are working on more interesting things like kernels, http servers, and databases. What really causes efforts like these to fail is a lack of people willing to take the time to pour through other people's code and make the changes and put together a working demonstration to show off.

      Perhaps you should start a project in sourceforge (if one or many don't exist already) to add a configuration api to all the coreutils and some other major apps. My best guess is that the configuration parts of programs are the most static, and patches against one version will probably work against newer versions.

      Another possibility is something like devfs for /etc that implements its configuration storage however it wants, and uses UFS to mount itself on /etc. This is more akin to Windows registry, but it would give a framework for building whatever storage database would be necessary for storing configuration for ALL unix software, and probably provide a lot of insight into why those configuration files are laid out like they are.

  53. how about "mv etc config" by tverbeek · · Score: 1
    Bingo.

    When I started playing with Linux several years ago, my reaction to the file system was "What were they thinking?" Not in the sense of "that was stupid" but seriously not having a clue what was supposed to be where. I managed to dig up a reference that explained the structure, but it hasn't helped because it doesn't conform to reality.

    One of my if-I-had-50-more-hours-a-day-and-knew-how-to-persu ade-people-to-follow-me projects would be to build a more intuitive file structure into *n*x. (Maybe starting with an overlay of symbolic links?) The biggest problem with "/etc" is its name; it should be called "/config" or something like that, rather than implying that it's just a bunch of insignificant leftover stuff that you don't need to worry about. The whole SysV init hierarchy could do with a facelift as well. To say nothing of the dozen *bin directories scattered about the tree. Sure, it was great to be able to wow my new boss with my tech savvy by sitting at a console and typing vi /var/named/foo.bar.zone, adding an A record, and then going /etc/rc.d/init.d/named restart to add a new hostname for our domain, but I don't think it gave her a very good impression of Linux's manageability (compared to say, edit /config/bind/zones/food.bar and /startup/master/bind restart). Sure, /etc could use some spit and polish, but once you find all those *.conf files, they're really not that difficult to deal with.

    --
    http://alternatives.rzero.com/
  54. My view... by agraupe · · Score: 3, Insightful

    Config files should be in separate directories of /etc based on the package/program they are for. On gentoo, for example, I have /etc/portage/. This is how it should work. It makes everything easy to find. I don't find etc-update a terrible amount of work, because I know that, if I didn't touch the config file in question, it is safe to update, because I'll be moving from a default to a default. As it is, it's not a big problem, because most programs have .conf files with descriptive names. As for the idea of a consistent API, I think it is doomed to failure because applications have such vastly different requirements from their config files. There are config files that just have the default settings for a program, all the way to something like the apache config file that is, essentially, the only way to control the program. As for the idea of one file, like the Windows Registry: no. Aside from insecurity, this means that a group (that, say, admins the HTTP server) can not be allowed to modify apache's config, but nothing else.

    1. Re:My view... by Famanoran · · Score: 1

      Alternatively, you could just do something similar to how Novell E-Directory works (and possibly other LDAP implementations)... A group container is setup for the group that administers the Apache webserver, then you give them write access to the Apache config container and all of its sub-containers...

      Rights inheritance is your friend.

  55. Describing Elektra? by cbr2702 · · Score: 1
    Congrats! Great minds indeed think alike. You've just re-invented Elektra. Read the original article. (-: Seriously! Go read it! You'll laugh at how similar Elektra is.

    Looks to me like he was describing our current /etc system. Is Elektra just XML metadata bolted onto an /etc like filesystem?

    --


    This post written under Gentoo-linux with an SCO IP license.
    1. Re:Describing Elektra? by Ogerman · · Score: 1

      Is Elektra just XML metadata bolted onto an /etc like filesystem?

      No. Elektra is a key-value based configuration scheme which uses the filesystem for storage, security, and hierarchy. http://elektra.sf.net

      For example, instead of passwd and shadow, you might have this:

      # system/users/nobody/uid: 99
      # system/users/nobody/gid: 99
      # system/users/nobody/gecos: Nobody
      # system/users/nobody/home: /
      # system/users/nobody/shell: /sbin/nologin
      # system/users/nobody/password: *
      # system/users/nobody/passwdChangeBefore: 0
      # system/users/nobody/passwdChangeAfter: 99999
      # system/users/nobody/passwdWarnBefore: 7
      # system/users/nobody/passwdDisableAfter:
      # system/users/nobody/passwdDisabledSince:
      # system/users/nobody/passwdReserved:

      This is very similar to the modern /proc and /sys filesystems in Linux. When I talk about XML meta-data, I refer to the fact that, for example, at the root of "system/users" you might have a file "config.xml" which describes all the valid options and values in the "users" hierarchy. This would allow for really slick GUI admin tools, but would not compromise the ability to configure the system by hand if desired or necessary.

    2. Re:Describing Elektra? by DrSkwid · · Score: 1

      each one a different file in the FS ?

      great, 20k to store '7' !!

      what's so wrong with one passwd file per user with all the key=value pairs inside?

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  56. just make /etc cfengine friendly by Jump · · Score: 1

    As a system admin for about 50 computer systems running different types of unix, I cannot see why /etc is considered a mess. It is only a few megabytes at most and provides easy filebased access to all important configuration files. Using your package manager of choice, you can easily find out which files in /etc belong to which program.

    If anything, I would suggest files in /etc to be
    cfengine friendly. A registry is nothing else but human readable /etc files + cfengine site managment functionallity.

  57. simple solution - autoconf by ctnp · · Score: 1

    If you don't like where your package leaves its config data, build it from source. Don't be lazy.

    root@moops:/usr/local/src/php-4.3.3# ./configure --help | grep sysconfdir

    --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]

  58. Re:The good, the bad, (sum up your post) by Laebshade · · Score: 1

    You want an easy-to-use abstraction layer.

  59. And a ".hidden" directory for all those dotfiles! by garyebickford · · Score: 1

    A lot of the problems between distributions would be solved if they agreed on a single, simple, underlying data format and structure for things. This has happened to some extent, but much remains to be done. One of my frustrations is that the major distro's are moving more and more into bloatware approaches to systems administration that make it more and more difficult to figure out how to make the system do the right thing.

    Instead of editing a single text file, I often end up spending four hours (or days) deciphering a complex overlay of bloatware programs and data files - so that I can edit their "never to be touched" text file, so that their configuration system will update the original text file in the correct way. ARGGGGHH!!

    I'd also like to see all those "hidden" files in my home directory pushed into a ".hidden" directory. Of course, if the various X applications followed the same convention, that would help. Acrobat Reader comes to mind.

    While I'm dreaming of the glorious integrated future, I'd like data commonality between various applications - like web browser bookmarks, mail file trees, etc. (Yes, I do switch between wysiwyg mail applications. I'm fickle, and none of them do _everything_ the way I want.)

    And, while I'm at it, how do I convince Gnome-2.6/Nautilus to include the "eject" option for the Desktop icon for my ATAPI Zip Drive? And how do I turn on window-edge gravity?

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  60. Oh really? What happens when... by Jamie+Lokier · · Score: 1

    What happens when you want to change a setting that's not shown in the user-friendly GUI "Settings" editor?

    Some programs have a lot of obscure options. Are they all presented in the nice "Settings" windows, for all Mac applications?

    That's a problem I've encounted with the simplest of systems (e.g. webmin) which edit files in /etc on a Linux box. Occasionally I need a setting which the fancy settings-editor doesn't know about, and then I have to worry that future uses of the settings-editor will break essential changes I had to make to /etc by hand, without me knowing until I observe the symptom maybe days or weeks later.

    Once that point is reached, that risk is unacceptable and the only safe thing to do is stop using the settings-editor.

    What is the solution to this? Making all the options visible in a GUI "Registry editor" type of program is not a solution, because if I've done something unusual to a file in /etc, then I will have added explanatory comments and grouped the unusual options together to make it obvious that they are related by my specific requirements. No "registry editor" I have ever seen offers that kind of functionality, which I find essential.

    -- Jamie

  61. Re:The good, the bad, (sum up your post) by gseidman · · Score: 1
    You want an easy-to-use abstraction layer.
    ...with a good UI, both a GUI and a console version. But yes, exactly. Someone else suggested that SuSE's Yast is that (and, presumably, more).
  62. Non Problem by truG33k · · Score: 1

    If you have this problem, it was of your own making. One thing I learned many years ago. Prefix every package to its own directory and use links in /etc. Now you can have /usr/local/ver1, /usr/local/ver2 and so on and create links to the config file. Also, who said you can't config the app to use a different path for the config file. The main reason I love *nix, is I have compelete control over my system. Even install prefixes and default config files ;-)

    --
    You only live once, so you might as well have fun before you die.
  63. /var even worse by Look+KG486 · · Score: 0
    What goes in /var? Logs, databases, package management stuff (e.g. portage). Then there's DNS and mail stuff (e.g. djbdns and qmail). At least with /etc, you can be reasonably sure you're looking at config files. /var is truly the "Wild West" of the filesystem.

    I'd offer some suggestions, but it would not matter. Folks are going to riddle directories as they see fit. Way it goes.

    --

    "Play is the only way the highest intelligence of humankind can unfold." -- Joseph Chilton Pearce

  64. Re:Oh really? What happens when... by Anonymous Coward · · Score: 0

    Pure FUD. You didn't even put any effort in to finding a good example, you just used something which one would never require to use on a mac, and even if they did, would only need to edit some configuration file because it's not a Mac app, it's some crazy Linux POS.

    If you put your energy in to forging a solution to your problems rather than bitching about how the alternatives are "unacceptable" and a "risk", you might actually have a fulfilling life.

  65. Re:Oh really? What happens when... by Jamie+Lokier · · Score: 1

    Dear Anonymous,

    What the fuck are you talking about?

    Your comment doesn't actually say anything. It doesn't answer any of the posed questions, and it doesn't offer any solutions to the real and genuine question of how to manage unusual configurations without editing /etc files.

    Your suggestion to "forge" an alternate solution, by which I can only presume you mean do something other than edit config files - WTF does that mean, do you have something to add or is it just a masturbatory flame?

    I have a solution to my problems, which is editing config files, or writing scripts which generate configs: it has so far always been the best solution that I'm aware of for the problems that I've encountered. You probably encounter different problems, so have different requirements.

    But I am not wedded to the approach. Which is why I asked if all configuration options for apps on the Mac are shown in the GUI. It is a pretty straightforward question. An answer of "yes" would be nice. Even if the answer is "yes but only if it's a Mac app", that would be nice. But apparently you don't answer questions, preferring instead to be an unfriendly wanker who can't tell the difference between a question and stupid fight.

    -- Jamie

  66. ReiserFS's plug-ins may help by Grincho · · Score: 1

    Something like ReiserFS's plug-ins might be useful here. See this example of how /etc/passwd could be split up to improve privilege granularity (search for "Take /etc/passwd for example"), all without breaking existing programs. This would also give you finer-grained modification timestamps, which would help you figure out what that pesky installer just did.

  67. Re:Oh really? What happens when... by raider_red · · Score: 1

    Hasn't happened yet.

    --
    It's good to use your head, but not as a battering ram.
  68. Re:Oh really? What happens when... by Jamie+Lokier · · Score: 1

    In case you're wondering if that's just me being a Luddite or if there's a solution in mind, perhaps there is.

    It's for each application to include metadata for each of its config files, indicating the types of data, ranges of options and so forth, and how to present the information in a config file editor. In addition, a certain free-form commenting and option-rearranging facility is needed when presenting configs in a config file editor.

    Such metadata would be quite complicated in some cases (examples of complicated configs: /etc/iptables.conf, /etc/samba/smb.conf, /etc/apache/httpd.conf). However, and XML Schema or something similar would likely cover most of the practical cases.

    Comments are important in config files, when a configuration is unusual. For example in my OpenVPN config, I have three options and a comment which I'll summarise here as: "ping-restart 60, ping 15, nobind -- all three are needed together to workaround a problem with some NAT routers, when the ADSL-side IP address changes dynamically".

    Somehow, a GUI, TUI, or even XML view which presents configuration files in a standardised syntax must be able to record this kind of human-relevant information somewhere. It's not enough that programs can read and edit the configs; they record important information for human users too.

    When the structure of a config file is described by some kind of metadata, that begs the question: can't the metadata described the syntax of the file too? There is no need to use XML, if the syntax can be adequately described by metadata in addition to the structure.

    Finally, it's essential that such metadata is updated by individual application updates, and not as part of a "config editor" package. This is because the metadata is only useful if it reflects the range of options currently supported by each application, not merely the options that the config editor knew about at its last release cycle. This may seem like a difficult thing to get widely adopted, but it would not be so difficult provided metadata was easy to write, described the kind of file formats that application writes are happy to use, and was actually useful. For better or worse, XML is not such a format, precisely because it's not very human friendly in comparison with many of the text formats.

    -- Jamie