diff --git a/ucs-school-umc-installer/umc/python/schoolinstaller/__init__.py b/ucs-school-umc-installer/umc/python/schoolinstaller/__init__.py index b7d8fd1..fefa8da 100644 --- a/ucs-school-umc-installer/umc/python/schoolinstaller/__init__.py +++ b/ucs-school-umc-installer/umc/python/schoolinstaller/__init__.py @@ -45,6 +45,7 @@ import select import errno from httplib import HTTPException +from distutils.version import LooseVersion import notifier import notifier.threads @@ -538,6 +539,13 @@ def install(self, request): if server_role == 'domaincontroller_backup' and not joined: raise SchoolInstallerError(_('In order to install UCS@school on a backup domain controller, the system needs to be joined first.')) + school_version = masterinfo.get('school_version') + local_school_version = self.get_school_version() + if not school_version or LooseVersion(school_version) < LooseVersion(local_school_version): + if not ucr.is_true('ucsschool/join/ignore-version-mismatch/%s/%s' % (school_version, local_school_version)): + raise SchoolInstallerError(_('The version of the UCS@school app on the DC master is lower than the version on this host. Please consult the Univention Support Database on how to proceed: http://sdb.univention.de/1373')) + MODULE.warn('Ignoring UCS@school version mismatch: Master: %s; Local: %s;' % (school_version, local_school_version)) + # everything ok, try to acquire the lock for the package installation lock_aquired = self.package_manager.lock(raise_on_fail=False) if not lock_aquired: