Tiny Core Linux
General TC => General TC Talk => Topic started by: jazzbiker on October 24, 2020, 02:41:33 PM
-
Hi, brothers in Core!
This is not the question of a big importance, just the wish to understand, what's under the hood. Grep'in gave me nothing, probably not the proper places were grep'ed. Can anybody cure my anxiety?
Thanks in advance and
Have a nice Core!
P.S. In the http://forum.tinycorelinux.net/index.php/topic,22054.0.html thread Rich explains BACKUP variable purpose, but what software do utilize it and what is the difference between BACKUP variable and /etc/sysconfig/backup file?
-
In the http://forum.tinycorelinux.net/index.php/topic,18970.0.html thread those BACKUP variable and /etc/sysconfig/backup file are discussed, gaining the theory, that these are (both, but they can differ?) the defaults for the X exit utility actions. But maybe something changed since 2015. I've changed in my ~/.profile
export BACKUP=0
#[ "`id -un`" = "`cat /etc/sysconfig/tcuser`" ] && echo "$BACKUP" | sudo tee /etc/sysconfig/backup >/dev/null 2>&1
but the default for X exit backup option is still "Safe". I am booting with "safebackup" bootcode.
So I still haven't found the impact.
-
Now after some experiments I accurately suppose, that BACKUP variable is used by exittc utility as default for "Backup option" field. And "safebackup" bootcode overrides this variable value. What's the use of /etc/sysconfig/backup not clear yet.
-
Hi jazzbiker
I did a little poking around in TC4 and TC10 and did not find anyplace /etc/sysconfig/backup gets read.
My guess is it's a remnant from an early version of TC. It probably got replaced by export BACKUP=1 but was
never removed.
-
Hi, Rich!
Thanks for Your answer and spending time on it. This file is written by .profile only for /etc/sysconfig/tcuser and make sense only if You login as "tc", then logoff and relogin as somebody else and start X server. But... nobody home.
There are many useful tools under the TinyCore hood and it is just a fun trying to guess their meaning and purposes. Just like a little boy exploring father's room while father's gone working :-) Probably this file is some reminder about father's youth with unknown functions, so let's put it on its place and try to find something amazing apart.
Thanks and best regards!
Seems, that topic can be marked as solved?
-
Hi jazzbiker
I did a little digging through the archives. TC3.1 is where /etc/sysconfig/backup first shows up in this form:
3.1
3.2
3.4
3.4.1
3.5
3.5.1
3.6
3.7
3.7.1
etc/skel/.profile:export BACKUP=1 && echo "$BACKUP" | sudo tee /etc/sysconfig/backup >/dev/null
Starting in TC3.8 it changed to this:
3.8
3.8.1
3.8.2
3.8.3
3.8.4
etc/skel/.profile:[ "`id -un`" = "`cat /etc/sysconfig/tcuser`" ] && echo "$BACKUP" | sudo tee /etc/sysconfig/backup >/dev/null
Nowhere could I find /etc/sysconfig/backup ever being read. I also looked through the sources of exittc and filetool
and was unable to locate any references to /etc/sysconfig/backup.
... Seems, that topic can be marked as solved?
Done. :)