View | Details | Raw Unified | Return to bug 40417
Collapse All | Expand All

(-)debian/changelog (+7 lines)
 Lines 1-3    Link Here 
1
univention-updater (11.0.4-1) unstable; urgency=medium
2
3
  * scripts/preup.sh: Check DC Master UCS version and abort if the DC
4
    master version is lower or equal (Bug #37260)
5
6
 -- Stefan Gohmann <gohmann@univention.de>  Sat, 24 Oct 2015 20:55:26 +0200
7
1
univention-updater (11.0.3-6) unstable; urgency=medium
8
univention-updater (11.0.3-6) unstable; urgency=medium
2
9
3
  * Bug #39082: Re-Revert, now with pep8 support
10
  * Bug #39082: Re-Revert, now with pep8 support
(-)script/preup.sh (+32 lines)
 Lines 317-322    Link Here 
317
	fi
317
	fi
318
fi
318
fi
319
319
320
# check for DC Master UCS version
321
check_master_version ()
322
{
323
	if [ -f /var/univention-join/joined ]; then
324
		if [ "$server_role" != domaincontroller_master -a "$server_role" != basesystem ]; then
325
			master_version="$(univention-ssh /etc/machine.secret ${hostname}\$@$ldap_master /usr/sbin/ucr get version/version 2>/dev/null)" >&3 2>&3
326
			master_patchlevel="$(univention-ssh /etc/machine.secret ${hostname}\$@$ldap_master /usr/sbin/ucr get version/patchlevel 2>/dev/null)" >&3 2>&3
327
			python -c 'from univention.lib.ucs import UCS_Version
328
import sys
329
master=UCS_Version("'$master_version'-'$master_patchlevel'")
330
me=UCS_Version("'$version_version'-'$version_patchlevel'")
331
if master <= me:
332
	sys.exit(1)
333
'
334
			if [ $? != 0 ]; then
335
				echo "WARNING: Your domain controller master is still on version $master_version-$master_patchlevel."
336
				echo "         It is strongly recommended that the domain controller master is"
337
				echo "         always the first system to be updated during a release update."
338
				
339
				if is_ucr_true update41/ignore_version; then
340
					echo "WARNING: update41/ignore_version is set to true. Skipped as requested."
341
				else
342
					echo "This check can be skipped by setting the UCR"
343
					echo "variable update41/ignore_version to yes."
344
					exit 1
345
				fi
346
			fi
347
		fi
348
	fi
349
}
350
check_master_version
351
320
# autoremove before the update
352
# autoremove before the update
321
if ! is_ucr_true update41/skip/autoremove; then
353
if ! is_ucr_true update41/skip/autoremove; then
322
    DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes autoremove >>"$UPDATER_LOG" 2>&1
354
    DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes autoremove >>"$UPDATER_LOG" 2>&1

Return to bug 40417