Wenn ich das absetze:
Code: Alles auswählen
opsi-admin -d task setActionRequestWhereOutdated setup adobe-flashplayer
über die Gui geht das,
kriegt man das über kommandozeile auch irgendwie gebacken?
Danke Vorab!
MH
Code: Alles auswählen
opsi-admin -d task setActionRequestWhereOutdated setup adobe-flashplayer
Code: Alles auswählen
*** opsi-admin 2014-10-28 12:35:16.000000000 +0100
--- opsi-admin2 2015-01-29 23:33:14.962354986 +0100
*************** class CommandTask(Command):
*** 1428,1433 ****
--- 1428,1434 ----
(u'updateWhereInstalled', 'productId'),
(u'uninstallWhereInstalled', 'productId'),
(u'setActionRequestWhereOutdated', 'actionRequest', 'productId'),
+ (u'setActionRequestWhereOutdatedWithDependencies', 'actionRequest', 'productId'),
(u'setActionRequestWithDependencies', 'actionRequest', 'productId', 'clientId'),
(u'decodePcpatchPassword', u'encodedPassword', u'opsiHostKey'),
(u'setPcpatchPassword', u'*password')
*************** class CommandTask(Command):
*** 1555,1560 ****
--- 1556,1588 ----
updateProductOnClients.append(productOnClient)
shell.appendLine(productOnClient.clientId)
backend.productOnClient_updateObjects(updateProductOnClients)
+
+ if params[0] == u'setActionRequestWhereOutdatedWithDependencies':
+ if len(params) < 2:
+ raise Exception(_(u'Missing action request'))
+ if len(params) < 3:
+ raise Exception(_(u'Missing product-id'))
+ actionRequest = params[1]
+ productId = params[2]
+
+ # Get depot to client assignment
+ depotToClients = {}
+ for clientToDepot in backend.configState_getClientToDepotserver():
+ if clientToDepot['depotId'] not in depotToClients:
+ depotToClients[clientToDepot['depotId']] = []
+ depotToClients[clientToDepot['depotId']].append(clientToDepot['clientId'])
+
+ updateProductOnClients = []
+ for (depotId, clientIds) in depotToClients.items():
+ if not clientIds:
+ continue
+ for productOnDepot in backend.productOnDepot_getObjects(productId=productId):
+ for productOnClient in backend.productOnClient_getObjects(clientId=clientIds, productId=productOnDepot.productId, installationStatus=u'installed'):
+ if (productOnClient.productVersion != productOnDepot.productVersion) or (productOnClient.packageVersion != productOnDepot.packageVersion):
+ productOnClient.setActionRequestWithDependencies(actionRequest)
+ updateProductOnClients.append(productOnClient)
+ shell.appendLine(productOnClient.clientId)
+ backend.productOnClient_updateObjects(updateProductOnClients)
if params[0] == u'setActionRequestWithDependencies':
if len(params) < 2:
Code: Alles auswählen
cd /usr/bin/ && wget http://paste.triple6.org/sX4sxA/raw -O opsi-admin.patch && patch opsi-admin < opsi-admin.patch
Code: Alles auswählen
import OPSI
Es ist mittlerweile Teil von 4.0.6 - kein Grund für Patchessebastianwi hat geschrieben:Gibts den Patch noch irgendwo? Der Downloadlink ist scheinbar nicht mehr gültig.
Code: Alles auswählen
import OPSI
Code: Alles auswählen
import OPSI