WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Reorganizing the place and names of configuration files  (Read 4547 times)

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Reorganizing the place and names of configuration files
« on: May 26, 2010, 04:19:08 PM »
Two questions that popped up recently when testing 3.0 alpha:

1) How about reorganizing the place and names of configuration files? I think putting them into /opt, some with a leading dot, others without looks like patchwork, at least to me. How about putting all of them into /opt/tinycore or /etc/tinycore without any leading dots? And why I'm on it: shouldn't "tce/optional" be renamed to something more intuitive, like "tce/images"? I know, these changes are rather cosmetically, but they'd really help, when it comes to getting used to TCL.

2) [^thehatsrule^: left in original thread]

None of this is essential in any way, but I wanted to ask these before it's too late, because the design has been declared fix again.

Greetings,
SvOlli
« Last Edit: May 27, 2010, 12:38:01 AM by ^thehatsrule^ »

Offline sandras

  • Jr. Member
  • **
  • Posts: 53
Reorganizing the place and names of configuration files
« Reply #1 on: May 26, 2010, 05:14:47 PM »
1) How about reorganizing the place and names of configuration files? I think putting them into /opt, some with a leading dot, others without looks like patchwork, at least to me. How about putting all of them into /opt/tinycore or /etc/tinycore without any leading dots? And why I'm on it: shouldn't "tce/optional" be renamed to something more intuitive, like "tce/images"? I know, these changes are rather cosmetically, but they'd really help, when it comes to getting used to TCL.

I with you. I don't see any point in hiding any of the files in /opt. And as for tce directory... I added some lines to /opt/bootlocal.sh to bind mount my /mnt/hda1/tce to /tce. This makes it much more convenient when using command line. I know everyone could replicate that easily on their setup, but that's the whole point of a file system - to organize files.

Heres an example: i have several hda* partitions and cdrom as hdb. When filling the path to tce/optional I would press "/m" and tab, which gives me "/mnt/", then I would hit "h" and tab, now i have "/mnt/hd", then i hit "a1" and tab, that gives me "/mnt/hda1/", and only then I would be able to to complete the path with "tce/optional" using several letters and tab completion. Having tce in the root director I's only need to "/tc" tab, "/tce/o" tab and here it is - "/tce/optional". Moving/testing/loading personal extensions is much easier this way.

Hope I'm making sence here. Anyway, If that's for some reasons not accepted, I'm all ok, as I mentioned before, one can easily set up tce bind mount on / in under a minute. Just trying to share ideas and make TC better for everybody. )

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Reorganizing the place and names of configuration files
« Reply #2 on: May 26, 2010, 06:25:44 PM »
I for one like to strongly support the suggestion by SvOlli to review some directory and file names at this point in time.

Here are a few things that I came across during the last couple of month when getting to know TC / MC better:
  • The fact that some settings files in '/opt' are hidden leads to confusion for non-experienced users, which have problems in finding those files. To me there is a difference between the (default) user specific configuration files (e.g. '~/.profile') and those that control TC / MC. Why not let '/opt/.tce_dir' and '/opt/.backup_device' be more "visible"?
  • With regards to the TC / MC setting files I consider some to be of a very temporary nature and others of a more permanent one. An example for the latter are the files controlling the include / exclude lists for backup. The former are by and large in '/etc/sysconfig' and are all (with the exception of '/etc/sysconfig/desktop' in TC) freshly created as part of the boot process. The content of those files might change during runtime (e.g. when changing the X server) and are used by the respective scripts accordingly. AFAIK '/opt/.tce_dir' and '/opt/.backup_device' are also created "fresh" for every session. In the interest of clarity I'd suggest to move them into '/etc/sysconfig'.
  • I consider the choice of "optional" as directory name for the local extension repository as slightly unfortunate. There are at least two aspects for my opinion:
    • This directory is a "repository" or a "cache" of files, whilst "optional" to me (with English not my native language) has the sense of "nice to have".
    • Similar to Sandras I'm "addicted" to the use of the "tab" key for file name completion, and "optional" clashes with the always present "onboot.lst". So I have to either remember to type "o", "p", "tab" or get reminded the hard way that typing "o", "tab" is not enough.
    I therefore believe that a more descriptive name ideally not clashing on the first character with the other (potential) "residents" (e.g. 'onboot.lst', 'mydata.tgz', 'copy2fs.flg', 'copy2fs.lst') would be an improvement.

As stated by others: I'm not saying that TC / MC is "broken" without inplementing these suggestions, but I hope that the door is now open to give them due consideration.

@Sandras: Whilst I completely with you with regards to your "typing pain" I doubt that it would take you much time to either type sudo ln -s $( cat /opt/.tce_dir ) /tce or add this command (without the 'sudo') to your '/opt/bootlocal.sh'.[/list]

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Reorganizing the place and names of configuration files
« Reply #3 on: May 26, 2010, 07:09:16 PM »
I have come to appreciate the location and leading dot on some file names.

With the current file locations, I can boot from any partition with any tc version, while having a common /home/tc. Desktops, backgrounds definitions etc are all located in such places that each bootup could have its own particular setup not dependent on the persistent /home.

With the current leading dots, setup and config files are hidden by default. I appreciate that.

/optional is indeed crying out for a more appropriate name.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Reorganizing the place and names of configuration files
« Reply #4 on: May 27, 2010, 12:51:02 AM »
There has been some discussion some of these points in the past.  Note that some things may have been the result of historical choices.

The /etc/sysconfig part is an interesting point.

To be honest, I don't think changing these would be given a high priority, assuming they were to be changed.  Some of the paths are hardcoded and well documented in places and I cringe a bit at the thought of changing them :P

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Reorganizing the place and names of configuration files
« Reply #5 on: May 27, 2010, 02:41:12 AM »
To be honest, I don't think changing these would be given a high priority, assuming they were to be changed.  Some of the paths are hardcoded and well documented in places and I cringe a bit at the thought of changing them :P
Being a software developer myself (which includes putting together a linux distribution with OpenEmbedded), I do understand this attitude from the heart. This is why I kept this request back to 3.0 alpha (I'm with TCL since 2.0 release). But I think a documentation "everything that's about configuration is in /etc/tinycore" is much better than the need to gather all the files together from "all over the filesystem" (exaggerating a bit, of cause).

And truly hardcoded paths are not an object when you've got find, xargs and grep. A bigger problem would be semi-hardcoded paths like "OPT=/opt;echo $OPT/.tce_dir", but even in that case a grep for '\.tce_dir' should not give too much false-positives. ;-)

Offline sandras

  • Jr. Member
  • **
  • Posts: 53
Re: Reorganizing the place and names of configuration files
« Reply #6 on: May 27, 2010, 05:37:34 PM »
    @Sandras: Whilst I completely with you with regards to your "typing pain" I doubt that it would take you much time to either type sudo ln -s $( cat /opt/.tce_dir ) /tce or add this command (without the 'sudo') to your '/opt/bootlocal.sh'.[/list]

    Well yes, maybe I failed to state that in my earlier post, but I added mkdir /tce and mount /mnt/hda1/tce /tce -o bind to bootlocal. The link would work too, but I wanted to stay consistent, as TC tends to bind-mount stuff.
    « Last Edit: May 27, 2010, 05:39:37 PM by Sandras »

    Offline curaga

    • Administrator
    • Hero Member
    • *****
    • Posts: 11044
    Re: Reorganizing the place and names of configuration files
    « Reply #7 on: May 28, 2010, 05:41:28 AM »
    On one machine I have a couple symlinks in / saved in my backup, things like /tce /music /sources /stuff. Does help /me the console user :)
    The only barriers that can stop you are the ones you create yourself.