Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: emninger on December 22, 2015, 07:35:45 PM
-
In the meantime i got a bit more familiar with tcl and therefore i wanted to clean-up my system a bit.
/home and /opt are set in the bootline.
My .filetool.lst looks like this:
etc/
usr/local/etc/
usr/local/etc/laptop-mode/laptop-mode.conf
usr/local/etc/laptop-mode/conf.d/usb-autosuspend.conf
usr/local/share/X11/xorg.conf.d/10-keyboard.conf
usr/local/etc/cups/ppd/HP_Deskjet_3900.ppd
usr/local/etc/cups/printers.conf
usr/local/etc/cups/cupsd.conf
etc/adobe/mms.cfg
My .xfiletool.lst looks like this:
Cache
cache
.cache
XUL.mfasl
XPC.mfasl
mnt
.adobe/Flash_Player/AssetCache
.macromedia/Flash_Player
.opera/opcache
.opera/cache4
.Xauthority
.wmx
etc/init.d
etc/modprobe.d
etc/pcmcia/
etc/profile.d
etc/skel/
etc/ssl/
etc/sysconfig/
etc/udev
etc/xdg/
Now, i know, i should not include directories, but, because i was so unfamiliar with tcl, many times i lost my settings and had to redo all the settings previously done ;)
For /etc you see i only protect the files in it (not any directory), but i'm unsure which ones really need to be protected and which ones not. Since i do not autologin i think passwd, passwd- and shadow and shadow- have to be protected. Moreover i protect hosts (since i do ad-blocking via hosts - i've a nice script to build from time to time a hosts file whereby i send to 0.0.0.0 crosscripting and advertising hosts) But what's with resolv.conf, fstab, wpa_supplicant.conf and others? Is there somewhere an instruction?
Moreover, i'm totally unsure regard /usr/local/etc ...
Thanks a lot in advance for any pointer!
-
...
For /etc you see i only protect the files in it (not any directory), but i'm unsure which ones really need to be protected and which ones not.
...
This is severely over complicating the issue.. if you loose configurations then so be it, better and more efficient to find those conf files responsible which require backup, then backup only those files. Keep it Simple.. I'd recommend removing all those etc related directory entries from both filetool.lst and xfiletool.lst then backup only those specific files you've purposely and intentionally configured specifically for your system. I don't know how to be more clear on that..
Keeping it simple means backing up a directory which only contains files you has configured or if it contains anything else then better to backup specific files only.
good luck
-
Keep in mind that /etc/hosts is recreated at boot by /usr/bin/sethostname , so it needs to be edited after that happened.
For example in bootsync.sh
cat /etc/my-hosts >> /etc/hosts
-
Thanks for the excellent advice. I've a question as for bootsync.sh:
My actual bootsync.sh looks like this:
/usr/bin/sethostname box
/opt/bootlocal.sh &
Is that correct that there is no "&" after the first line? Following your advice i'd have to add a line in the middle i presume:
/usr/bin/sethostname box
cat /home/tc/blocklist >> /etc/hosts
/opt/bootlocal.sh &
Is that correct? Or with an ampersand at the end?
TIA!
-
Using an ampersand (&) to prevent further 'delay' wouldn't hurt.
-
Hi emninger
Using an ampersand (&) to prevent further 'delay' wouldn't hurt.
Using an ampersand will place a task into the background and make it run asynchronously. When multiple tasks are
placed into the background, there is no guarantee that the first task will finish before the next task starts. If the second
task depends on the first task, you may find yourself in a situation where sometimes things work properly and
sometimes they don't. You want sethostname to complete before /etc/hosts gets modified. If anything in bootlocal.sh
depends on /etc/hosts , you want to be sure the cat command completes before bootlocal.sh is called.
-
If i understand right: Without an ampersand the commands are done "step by step", one after the other. If not, executing could be overlapping (and sometimes create errors)?
PS. Maybe you gave me right now, the explanation, why, sometimes, one of my 2 conkys i'm running (one sysinfo, one weather forecast) does not come up. Without any logic and explanation (i played around a lot with the sleep option instead). Great, now i know where and how to look at this!
-
Hi emninger
If i understand right: Without an ampersand the commands are done "step by step", one after the other. If not, executing could be overlapping (and sometimes create errors)?
That's correct.
-
...
For /etc you see i only protect the files in it (not any directory), but i'm unsure which ones really need to be protected and which ones not.
...
This is severely over complicating the issue.. if you loose configurations then so be it, better and more efficient to find those conf files responsible which require backup, then backup only those files. Keep it Simple.. I'd recommend removing all those etc related directory entries from both filetool.lst and xfiletool.lst then backup only those specific files you've purposely and intentionally configured specifically for your system. I don't know how to be more clear on that..
Keeping it simple means backing up a directory which only contains files you has configured or if it contains anything else then better to backup specific files only.
good luck
I did dare to follow your advices and, voilĂ , it worked - as far as i see in this moment ... :D Thanks a lot for your patience!
Now my .filetool.lst looks like this:
etc/gshadow
etc/passwd
etc/passwd-
etc/shadow
etc/shadow-
etc/adobe/mms.cfg
usr/local/etc/laptop-mode/laptop-mode.conf
usr/local/etc/laptop-mode/conf.d/usb-autosuspend.conf
usr/local/share/X11/xorg.conf.d/10-keyboard.conf
usr/local/etc/cups/ppd/HP_Deskjet_3900.ppd
usr/local/etc/cups/printers.conf
usr/local/etc/cups/cupsd.conf
usr/local/var/log/tor
and my .xfiletool.lst:
Cache
cache
.cache
XUL.mfasl
XPC.mfasl
mnt
.adobe/Flash_Player/AssetCache
.macromedia/Flash_Player
.opera/opcache
.opera/cache4
.Xauthority
.wmx
Does that seem correct, now?
Btw, i noticed a small problem: In the graphical control panel > Backup/Restore i was unable to delete item as well as to clear item (what's the difference between them both?). I had to edit .(x)filetool.lst by hand (i.e. by the editor). Where should i look to correct that?
-
Much better, good job.. Also if you don't really need the backup copies you could also delete the files with the tilde attached :)
Sent from my iPhone using Tapatalk
-
As I get it, "Clear Item" just means 'de-select anything' so the "Add" button gets active again.
Not sure why you can't "Delete Item". Are /opt/.filetool.lst and /opt/.xfiletool.lst owned by root:root or something else than -rw-rw-r-- ?
-
No, they are owned by user (tc) and they are marked correctly.