But I wondered, why this file is not modified during my updates. As people told, /etc/profile is
part of the package base-files and is copied from /usr/share/base-files/profile.
Examination of the files showed, there is a differnce between /etc/profiles and /usr/share/base-
files/profile.
Can someone tell me, why not? And related to this question: Does this behaviour effect other
files, too, like bashrc bashrc_aliases and similar?
But I wondered, why this file is not modified during my updates. As people told, /etc/profile is
part of the package base-files and is copied from /usr/share/base-files/profile.
Examination of the files showed, there is a differnce between /etc/profiles and /usr/share/base-
files/profile.
I would have expected, that both foles are identical and /etc/profile will be renewed and
overwritten during upgrades.
Can someone tell me, why not? And related to this question: Does this behaviour effect other
files, too, like bashrc bashrc_aliases and similar?
I saw some changes to these files in /etc/skel/, so these might only affect newly added users
(whoich I do not have). My system is really, really old, first install was Debian/Etch and then
upgraded until today (Bookworm).
The /var/lib/dpkg/info/base-files.postinst script contains code that will modify /etc/profile if the first argument is "configure" and the second argument isn't the empty string.
I don't know what would cause those particular arguments to be passed to
that script.
In order for that modification to happen, the existing file's MD5 checksum
is compared against the one found in /usr/share/base-files/.
So... either your /etc/profile doesn't have the right MD5 checksum, or
else nothing is calling that postinst script with the correct arguments.
so, if that is true, what you say (or if I understood you correctly), then a reinstall or upgrade of
the package "base-files" should overwrite /etc/profile if the md5sum is different.
md5sum /etc/profile
40f068da82e55a304d8baf245600b636 /etc/profile
md5sum /usr/share/base-files/profile
48a30a427d1794feb49f102b87ddce2b /usr/share/base-files/profile
Without md5sum it can also be clearly seen, as both files got different content.
Additionally (but can not prove it), it may be, that a missing file will be renewed during upgrade
(did not test this!).
On Wed, Oct 16, 2024 at 19:03:27 +0200, Hans wrote:Just for reference, the excruciating details of how and when each maintainer script is called are here:
But I wondered, why this file is not modified during my updates. As people told, /etc/profile is
part of the package base-files and is copied from /usr/share/base-files/profile.
It's not actually part of the base-files package. It's not part of *any* package.
The /var/lib/dpkg/info/base-files.postinst script contains code that will modify /etc/profile if the first argument is "configure" and the second argument isn't the empty string.
I don't know what would cause those particular arguments to be passed to
that script.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 154:55:23 |
Calls: | 10,383 |
Files: | 14,054 |
Messages: | 6,417,848 |