Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: SvOlli on May 26, 2010, 04:19:08 PM

Title: Reorganizing the place and names of configuration files
Post by: SvOlli 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
Title: Reorganizing the place and names of configuration files
Post by: sandras 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. )
Title: Reorganizing the place and names of configuration files
Post by: maro 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:

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]
Title: Reorganizing the place and names of configuration files
Post by: jur 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.
Title: Re: Reorganizing the place and names of configuration files
Post by: ^thehatsrule^ 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
Title: Re: Reorganizing the place and names of configuration files
Post by: SvOlli 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. ;-)
Title: Re: Reorganizing the place and names of configuration files
Post by: sandras 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.
Title: Re: Reorganizing the place and names of configuration files
Post by: curaga 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 :)