Tiny Core Extensions > TCE Talk
[Solved] /etc vs. /usr/local/etc pain
GNUser:
For me, one of the very few pain points (possibly the only one) in using TCL is the fact that some extensions use /etc for config files while other use /usr/local/etc.
The pain arises when I'm trying out an extension for the first time: It takes some investigating and/or trial and error to figure out which etc directory to use.
I understand and agree with reasoning behind having /usr/local/etc but the reality is that many extensions do not use it--either because the extension contributor was unaware of our convention or because the build process for some applications makes it difficult/impossible to specify the configuration directory. The problem is not that the /usr/local/etc convention exists--the problem is that not all extensions follow the convention.
I'm not suggesting that the convention of using /usr/local/etc for extensions be abolished. But I would like to explore whether it's possible for a user who would rather have a single etc directory (e.g., me) to tweak his TCL system so as to achieve this.
I'm on TCL15 x86_64 and already tried remastering corepure64.gz by adding a symlink at /usr/local/etc that points to /etc. Booting with the remastered corepure64.gz did not go well.
Is this a fool's errand or is there an elegant way to achieve a working system where /usr/local/etc simply points to /etc? Many thanks for any insights/advice you can give.
Leee:
--- Quote from: GNUser on February 03, 2025, 12:37:24 PM ---For me, one of the very few pain points (possibly the only one) in using TCL is the fact that some extensions use /etc for config files while other use /usr/local/etc.
The pain arises when I'm trying out an extension for the first time: It takes some investigating and/or trial and error to figure out which etc directory to use.
I understand and agree with reasoning behind having /usr/local/etc but the reality is that many extensions do not use it--either because the extension contributor was unaware of our convention or because the build process for some applications makes it difficult/impossible to specify the configuration directory. The problem is not that the /usr/local/etc convention exists--the problem is that not all extensions follow the convention.
I'm not suggesting that the convention of using /usr/local/etc for extensions be abolished. But I would like to explore whether it's possible for a user (me) to tweak his TCL system so that everything goes into /etc.
I'm on TCL15 x86_64 and already tried remastering corepure64.gz by adding a symlink at /usr/local/etc that points to /etc. Booting with the remastered corepure64.gz did not go well.
Is this a fool's errand or is there an elegant way to achieve a working system where /usr/local/etc simply points to /etc? Many thanks for any insights/advice you can give.
--- End quote ---
My best suggestion would have been exactly what you already tried - symlink /usr/local/etc to point to /etc - although I would have, perhaps naively, tried a lazy way first without remastering. Remastering is clearly a better solution.
What were the details of "didn't go well"?
GNUser:
--- Quote from: Leee on February 03, 2025, 12:52:59 PM ---What were the details of "didn't go well"?
--- End quote ---
Hi Leee. Boot process completes and extensions are loaded, but instead of seeing my fluxbox desktop with custom desktop background I briefly see TCL's default desktop background and then screen turns black and I can't see the desktop. Hard to say exactly what's broken but the "fix" is to reboot from the console into my recovery partition and revert the remastered rootfs to stock rootfs.
So my conclusion is that the /usr/local/etc to /etc symlink in the rootfs is breaking one or more extensions.
Leee:
--- Quote from: GNUser on February 03, 2025, 12:58:03 PM ---
--- Quote from: Leee on February 03, 2025, 12:52:59 PM ---What were the details of "didn't go well"?
--- End quote ---
Hi Leee. Boot process completes and extensions are loaded, but instead of seeing my fluxbox desktop with custom desktop background I briefly see TCL's default desktop background and then screen turns black and I can't see the desktop. Hard to say exactly what's broken but the "fix" is to reboot from the console into my recovery partition and revert the remastered rootfs to stock rootfs.
So my conclusion is that the /usr/local/etc to /etc symlink in the rootfs is breaking one or more extensions.
--- End quote ---
I haven't tried making any substantial mods to corepure64.gz (I'm just in the early stages of playing around with remastering) so sorry if this obvious or way out in left field but, even that early in the boot process... did you copy everything from /usr/local/etc/ into /etc/ before making the symlink?
Also, for simplicity in testing, I think you can create an additional .gz file (maybe corepure64_2.gz), containing only your modified files, and load it after the original and files in it will replace the original files from the original .gz. Then turning your mods on or off is just a matter of loading or not loading the extra .gz file at boot time. (Dead simple using grub but it's been ages since I used any other bootloader.)
FWIW, for me, the pain of having both /etc/ and /usr/local/etc/ is so minuscule that I would have never tried this particular mod. Far worse, for me, is the pain of trying to get the line spacing the way I want it here in the forum. :)
GNUser:
Hi Leee. Yes, using multiple initramfs archives and turning them on/off via bootloader is a nice trick.
I think I'm just going to give up on this mod. A symlink in the rootfs seems like the most promising approach but it's definitely breaking extension(s). I think having to troubleshoot the breakage is more painful than just living with the two etc directories.
Happy hacking!
Navigation
[0] Message Index
[#] Next page
Go to full version