Am 29.01.25 um 15:08 schrieb Yavor Doganov:
Michael Biebl wrote:
Am 29.01.25 um 14:36 schrieb Yavor Doganov:
Since the old postinst runs "hostname -i" (bad idea, I know) I
guess the file is going to be different across various systems,
depending on the configuration.

What you could do then, is to generate the list of known hashes
on-the-fly by taking "hostname -i" into account. Instead of
hard-coding the hashsums, you generate them in preinst in exactly the
same way as previous versions did.

Does that make sense?

Yes, it makes perfect sense.  But I have very poor shell scripting
skills and have to figure out a way to do it.  I guess I should create
a temporary file and compare the md5sums with the file on the system,
and silently delete it if they match.  Perhaps some version check
would be necessary to avoid executing it every time.

Also, shouldn't this code snippet be in prerm instead of preinst (and
only applicable for the "upgrade" action)?


You can't retroactively add code to existing packages. Can you be more specific, why you want to add that code to the prerm of the "existing" package?

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to