Bug 42330 - Remove old code in maintainer script for unrelevant versions
Summary: Remove old code in maintainer script for unrelevant versions
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: General
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.0-3
Assignee: Philipp Hahn
QA Contact: Florian Best
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-09 09:59 CEST by Philipp Hahn
Modified: 2023-02-13 11:41 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2016-09-09 09:59:46 CEST
management/univention-join/debian/univention-join.postinst

if [ "$1" = configure -a -n "$2" ] && dpkg --compare-versions "$2" lt 0.7; then
	res=`find /etc/univention/ssl/ -group root`
	if [ -n "$res" ]; then
		find /etc/univention/ssl/ -group root | xargs chown root."DC Backup Hosts" >/dev/null 2>&1
	fi
fi

if [ "$1" = configure -a -n "$2" ] && dpkg --compare-versions "$2" lt 2.0.19-1; then
       if [ -e "/etc/ldap-backup.secret" ]; then
		chmod 640 /etc/ldap-backup.secret
		chgrp "DC Backup Hosts" /etc/ldap-backup.secret || true
       fi
fi

if [ "$1" = "configure" -a -n "$2" ] && dpkg --compare-versions "$2" lt 4.0.4-1; then
	for secret_file in "/etc/ldap.secret" "/etc/ldap-backup.secret" "/etc/machine.secret" "/etc/backup-join.secret" "/etc/slave-join.secret"; do
		## remove EOL
		if test -e "$secret_file"; then
			tmp_ldap_secret_file="${secret_file}.dpkg-tmp"
			cp -a "$secret_file" "$tmp_ldap_secret_file"
			echo -n "$(cat "$secret_file")" > "$tmp_ldap_secret_file" && mv "$tmp_ldap_secret_file" "$secret_file"
		fi
	done
fi
Comment 1 Ingo Steuwer univentionstaff 2020-07-03 20:52:30 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Comment 2 Philipp Hahn univentionstaff 2020-07-04 09:19:58 CEST
That code is still there.
But there also is lots of other code in our Debian maintainer scipts now, which should be removed.
Comment 3 Philipp Hahn univentionstaff 2023-02-06 19:59:14 CET
374d472f5752fae9d9e250999b6981ccc87f87ab
Comment 4 Florian Best univentionstaff 2023-02-06 20:50:14 CET
OK: removal of dead code
OK: changelog entry
Comment 5 Florian Best univentionstaff 2023-02-13 11:41:24 CET
UCS 5.0-3 has been released.

https://docs.software-univention.de/release-notes/5.0-3/en/

If this error occurs again, please clone this bug.