Univention Bugzilla – Attachment 8545 Details for
Bug 43882
Disable domain-join (and executing pending join scripts) during univention-upgrade
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
updater_or_dpkg_lock.patch
updater_or_dpkg_lock.patch (text/plain), 1.60 KB, created by
Arvid Requate
on 2017-03-15 17:17:08 CET
(
hide
)
Description:
updater_or_dpkg_lock.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2017-03-15 17:17:08 CET
Size:
1.60 KB
patch
obsolete
>Index: umc/join.xml >=================================================================== >--- umc/join.xml (Revision 77738) >+++ umc/join.xml (Arbeitskopie) >@@ -7,7 +7,7 @@ > <categories> > <category name="domain"/> > </categories> >- <command name="join/locked" function="dpkg_locked"/> >+ <command name="join/locked" function="updater_or_dpkg_lock"/> > <command name="join/scripts/query" function="query"/> > <command name="join/logview" function="logview"/> > <command name="join/joined" function="joined"/> >Index: umc/python/join/__init__.py >=================================================================== >--- umc/python/join/__init__.py (Revision 77738) >+++ umc/python/join/__init__.py (Arbeitskopie) >@@ -50,6 +50,7 @@ > from univention.management.console.config import ucr > from univention.management.console.modules.decorators import simple_response, sanitize > from univention.management.console.modules.sanitizers import StringSanitizer, ListSanitizer, BooleanSanitizer >+from univention.updater.locking import UpdaterLock > > _ = umc.Translation('univention-management-console-module-join').translate > >@@ -279,11 +280,15 @@ > self.progress_state = Progress() > > @simple_response >- def dpkg_locked(self): >- """Do not execute join scripts when dpkg is running (e.g. via >- App Center) >+ def updater_or_dpkg_lock(self): >+ """Do not execute join scripts when updater or dpkg >+ are running (e.g. via App Center) > """ >- return self._dpkg_locked() >+ try: >+ with UpdaterLock(): >+ return self._dpkg_locked() >+ except SystemExit: >+ return True > > def _dpkg_locked(self): > fd = apt_pkg.get_lock('/var/lib/dpkg/lock')
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43882
: 8545